This is a beginner’s guide shows how to install applications in different ways in Ubuntu Linux.
In Ubuntu Linux world, a software may be available in different package formats, e.g., .deb
, .sh
, .appimage
, .run
. If you’re confused with them, let me show you the difference.
1. DEB
The deb, a package file with .deb extension, is the Debian binary package file format. It’s native in Ubuntu, Debian, and based systems.
Most packages in Ubuntu Software and all in Synaptic package manager are .deb packages. Many software developers offer .deb package in project pages for downloading.
You can install a deb package via:
- GDebi package installer, which can be installed from Ubuntu Software.
- Software Install, right-click on deb package and select open with “Software Install”
- dpkg -i command, it’s usually
sudo dpkg -i ~/Downloads/filename.deb
. You have to runsudo apt -f install
command to fix dependency if any. - sudo apt install ./package.deb, you have to first navigate to the folder that contains the deb package.
2. Apt (or apt-get)
Apt or apt-get is a command line tool to download & install software packages with .deb extension.
It fetches packages both from Ubuntu main repositories (relies on /etc/apt/sources.list file) and from third-party repositories (relies on files in /etc/apt/sources.list.d).
apt command examples:
sudo apt update
– refresh the system cache.sudo apt upgrade
– install available upgrades of all packages, usually run after sudo apt update command.sudo apt install openssh
– install a package (openssh in the case), while typing the package name, you can press Tab key to list or auto-complete package names.sudo apt remove openssh
– remove a package (openssh in the case).
Where to get more apt repositories?
Besides the default Ubuntu repositories, you can get third-party network repositories from:
- Software’s own apt repository, Some applications (e.g, Google Chrome, Virtualbox, Skype, Sublime Text, etc.) host their own network repositories contain Linux packages.
- Launchpad PPA, software developers or the community are maintaining tons of packages in launchpad.net (offered by Ubuntu Canonical). Some popular PPAs include: LibreOffice PPA, Graphics Driver PPA, OpenShot stable PPA.
3. SNAP
Snap is a Linux universal package format that runs in sandbox. It’s developed by Canonical, the company behind Ubuntu. And the daemon is pre-installed in Ubuntu 18.04 and higher.
For Ubuntu 18.04, Ubuntu 20.04, and higher, most snap applications are available to install in the Software.
You can alternatively run command in terminal to install a snap application:
sudo snap install PACKAGENAME
You can also browser snap applications in snapcraft.io.
4. Flatpak
Similar to Snap, Flatpak is another Linux universal package format runs in sandbox. It’s developed by an independent community, and available in most Linux after following this setup.
And most flatpak software packages are available in flathub.org
5. Appimage
Appimage is single executable file that bundles most run-time libraries, and runs in most Linux desktops.
Many projects (e.g., Krita, Subsurface, Musescore, and digiKam) provide Appimage packages in their download page.
To run appimage, go to its Properties > Permissions dialog and tick the box “Allow executing file as program”, then right-click and select Run.
6. sh, bin
Some applications provide .sh or .bin files in the download page. They are executable Linux files run in command line.
Open terminal or in command console navigate to the folder that contains the sh or bin file. Then you can the file via two commands:
- Give executable permission:
chmod +x filename.sh
or
chmod +x filename.bin
- Then run the file via command:
./filename.sh
or
./filename.bin
7. Portable tar or zip
Many applications (e.g., Firefox, Pycharm) provide Linux packages with .tar or .zip extension.
Simply extract the package and you’ll find executable file in the source folder to launch the software.
Summary:
There are many ways to install applications in Ubuntu Linux. While .deb and / or apt is more ‘native’, Snap and Flatpak are universal Linux packages however need a separate daemon to run in your desktop. And portable tarball and Appimage can run software without installing it on your system.
Some command line tools provide sh bash scripts or executable bin files to set them up in your system.