How to Install Linux Apps

The command line makes it easy to add specific programs to your system

If you’ve decided to take the leap into the land of Linux, one of the first questions you might find yourself asking is, “How do I install applications?” We’re going to remove the mystery from that task so you have all the tools you need to get your work done.

The Methods of Installation

There are three different ways to install applications on Linux:

  • Using a graphical package manager.
  • From the command line.
  • Compiling from source code.

We’ll take a look at the first two methods, as compiling from source code isn’t always the best route to go. Before we get into the how-to of installing applications, there are some questions to be asked and answered.

Does Distribution Choice Matter?

The answer to this question depends on the method of installation you choose. If you opt to go the GUI package manager route, such as Ubuntu Software, GNOME Software, or the Elementary AppStore, distribution choice isn’t nearly as important. Installing a piece of software with GNOME Software is the same on Debian as it is in Fedora. It’s when you start working with installing applications from the command line that distribution matters because many distributions of Linux use a different package manager—which brings us to our next question.

What Is a Package Manager?

A package manager is a collection of tools that help automate the process of installing, upgrading, configuring, and removing software on a Linux distribution. The different package managers are:

  • DPKG: The base package manager for Debian-based distributions.
  • Apt: A front-end for the DPKG system, found in Debian-based distributions, such as Ubuntu, Linux Mint, and Elementary OS.
  • Apt-get: A more feature-rich front-end for the DPKG system, found in Debian-based distributions.
  • RPM: The base package manager found in Red Hat-based distributions, such as Red Hat Enterprise Linux, CentOS, and Fedora.
  • Yum: A front-end for the RPM system, found in Red Hat-based distributions.
  • Dnf: A more feature-rich front-end for the RPM system.
  • ZYpp: Found in SUSE and OpenSUSE.
  • Pacman: The package manager for Arch Linux-based distributions.

Where the package manager gets a bit confusing for new users is that distributions such as Ubuntu contain both DPKG and Apt. The difference is the dpkg command is used to install a local .deb file, whereas the apt command is capable of installing software from a repository. The same holds true for Red Hat-based distributions, where the rpm command is used to install local .rpm files, whereas yum and dnf can install software from remote repositories.

Which leads us to our next question.

What Is a Repository?

Nearly every Linux distribution is capable of using remote repositories for the installation of software. A repository is a remote server that contains a collection of software that can be installed. There are default repositories a distribution will be aware of, and there are third-party distributions you can add to your system. Once a third-party repository has been added, any Linux software package contained within that repository can be installed on the system.

Let’s install something.

How to Install Programs on Linux From a GUI

There are different GUI tools, depending on your distribution. Here’s a sample:

  • Ubuntu Linux: Ubuntu Software
  • Elementary OS: AppStore
  • GNOME Software: Any distribution running the GNOME desktop
  • Discover: KDE’s GUI tool
The Ubuntu Software GUI.

Since Ubuntu Linux is one of the most popular and user-friendly Linux distribution, we’ll demonstrate on Ubuntu Linux 18.04.

  1. From the Launcher (sidebar on the left side of the desktop), select the Ubuntu Software icon (orange briefcase with an A in the center).

  2. Once Ubuntu Software is open, press Search in the top right corner.

  3. Search for the application you want to install.

  4. Press Install on the application page.

    Install button for Firefox on Linux
  5. When prompted, type your user password.

  6. Allow the installation to complete.

Adding Repositories From the GUI

Of course, what we’ve just done only applies to the software found in the default repositories. Should you find a third-party repository you want to add, you might have to open a different piece of software. For example, with Ubuntu Linux, you open the Software & Updates application. If your distribution has the KDE desktop, you can not only install software from within Discover, but add repositories all from within the same tool.

Sticking with our example, open Software & Updates. In the resulting window, do the following:

  1. Select the Other Software tab.

    The Other Software tab
  2. Press Add.

  3. Type the complete apt line for the repository to be added. For example, "deb bionic main"

    Adding new repositories to Ubuntu Linux.
  4. Press Add Source.

  5. Type your user password.

How to Install Linux Software From the Command Line

Believe it or not, this process is actually easier from the command line.

Now you’ll get to see just how flexible Linux really is. Although a standard user can get away with never touching the command line, it’s always good to have this knowledge on your side.

Let’s do the following:

  • Add a repository
  • Updating apt
  • Install an application

For demonstration purposes, we’ll install the flatpak tool, which is a universal installer system.

  1. The first thing to do is add the third-party repository, so apt is aware of the software. To do this, open a terminal window and issue the command:

    sudo add-apt-repository ppa:alexlarsson/flatpak

    Adding repositories from the command line.
  2. You will first be prompted for your user password. Once you type that, you'll be asked to hit Enter to accept the installation of the repository. When that's completed, you’re ready to move on.

  3. The next step is to update apt. Even though you’ve added the repository, apt isn’t aware of the software available on that remote server. To update apt, issue the command:

    sudo apt-get update

  4. Once completed, you're now ready to install the actual software. To install the software, issue the command:

    sudo apt-get install flatpak

    Installing flatpak on Ubuntu.
  5. You'll be prompted to OK the installation. Type “y” and hit Enter on your keyboard. The installation will start and finish, resulting in flatpak installed on your system.

You'll also find a vast amount of software ready to be installed from the default repositories. You can either search the GUI tool for that software, or issue a search command. For example, say you want to know what software is available with the keyword “office”. From the command line enter:

apt-cache search office

Chances are the output of that command will fly by too quickly. Fortunately, you can scroll through the output to find what you’re looking for.

Once you find the name of the software, install it and you’re ready to go.

Was this page helpful?