A deb file is a type of format for the packaging Linux programs - specific to Debian-based distributions (in the way in Windows you have the "exe" files). It can be downloaded on your computer and installed.
The installation can be
- manual (one of the options you mention), when you download the deb and then install with a specialized program, or
- automatic (the deb is downloaded and installed by a program).
Among the programs (GUI or CLI) that can manage the installation some
can do both those things (GUI: Ubuntu Software Center, Discover; CLI: apt
, apt-get
;
can only install from a local deb file (GUI: Gdebi, Qapt; CLI: dpkg
, which is the base for all the other tools mentioned here - as said in the other answer);
can only download & install automatically (that's just GUI: Synaptic, Apper, Muon).
So, apt
or apt-get
(like their GUI equivalents Ubuntu Software Center and Discover) can download the deb packages before installing them if the specific software source (or "repository") is already registered to your system or if you add it yourself OR they can install a program from a deb file that you already have.
Is there any benefit from choosing one over the other? What is the
technical difference?
The main difference is not between the way installation is done in the two cases, but in the origin of the deb file. Just as you can download a file from the internet from a trusted or a less-trusted source, repositories are of different categories. The main difference is between official system sources (those provided by Ubuntu) and those provided by third parties.
There is no point in installing from local file a program that is available in repositories unless you lack internet connection, or you want to install a program version that is not in the repositories.
Usually the main reason for adding a new repo or installing from a local file is the absence in repos of a program or of a certain version of a program.
Remember: on Ubuntu sudo apt install
command installs from deb anyway. The difference is whether you have the deb already on your computer or the installer will download it for you. In the latter case deb file are downloaded at /var/cache/apt/archives
.
Deb files can be found not only on the internet, in some cases they can also be created from sources or converted from other formats (namely from rpm
packages - specific to RedHat/Fedora - based distributions).