In Ubuntu, you typically use Apt-get to install software tools,
For example sudo apt-get install g++
Apt-get will find the software image you need in the mirror library (e.g. g++) to install, then where did apt-get find it?
In Ubuntu, the file/etc/apt/sources.list is written with a list of server addresses for the Linux image source, and Apt-get is looking for installation files on those servers.
More about Sources.list See the summary of Sources.list on Ubuntu
Another way is to install offline, offline installation does not require networking, but need to be prepared in advance to install the software required for each of the. deb files, you can use the command sudo apt-get-f install [g++] to view.
When ready, use sudo dpkg-i ... command to install.
It is important to note that after the offline installation is complete, it may not be available in the current working directory because the current working directory cannot find the execution file for the command. You can find the executable file that installs the software under directory/usr/bin.
About Software Installation in Ubuntu