How To Install Programs On Linux

7 min read

Installing programs on Linux might seem intimidating at first, especially if you’re used to the double-click simplicity of Windows or macOS. This guide will walk you through the primary methods of installing software on Linux, covering package managers, Snap and Flatpak, compiling from source, and graphical software centers. Even so, Linux offers a reliable, flexible, and secure system for software installation that, once understood, can make managing applications more efficient and reliable than any other operating system. By the end, you’ll have the confidence to install any program on your Linux distribution with ease Most people skip this — try not to..

Most guides skip this. Don't.

Understanding Linux Package Managers

At the heart of Linux software installation lies the package manager. A package manager is a collection of tools that automate the process of installing, updating, removing, and managing software packages. Unlike traditional installers, which require manual downloads and potential security risks, package managers see to it that software is sourced from trusted repositories, dependencies are automatically resolved, and updates are streamlined And it works..

Most guides skip this. Don't That's the part that actually makes a difference..

Each Linux distribution (or “distro”) typically uses its own package manager. The most common ones include:

  • APT (Advanced Package Tool): Used by Debian, Ubuntu, and their derivatives.
  • YUM/DNF: The package manager for Red Hat-based distributions like Fedora, CentOS, and RHEL.
  • Zypper: The command-line package manager for openSUSE.
  • Pacman: The default for Arch Linux and Manjaro.

These tools handle software in the form of packages, which are compressed files containing the program, its dependencies, and installation scripts.

Installing via Package Managers

Using a package manager is the most straightforward and secure way to install software on Linux. Here’s how to do it with the most popular package managers.

Using APT (Debian/Ubuntu)

For Ubuntu and Debian-based systems, APT is your go-to tool. To install a package, open a terminal and use the following command:

sudo apt update
sudo apt install package-name

The first command updates the list of available packages and their versions, ensuring you’re working with the latest information. The second command installs the specified package. To give you an idea, to install the text editor Vim, you would run:

sudo apt install vim

APT will automatically download and install Vim along with any dependencies it requires Small thing, real impact..

Using DNF (Red Hat/Fedora)

For Fedora, CentOS, or other Red Hat-based distributions, DNF has largely replaced YUM. The process is similar:

sudo dnf update
sudo dnf install package-name

To install Vim on Fedora, you would use:

sudo dnf install vim

Using Zypper (openSUSE)

On openSUSE, Zypper handles package management. The commands are:

sudo zypper refresh
sudo zypper install package-name

As an example, to install Vim:

sudo zypper install vim

Using Pacman (Arch Linux)

Arch Linux and its derivatives use Pacman. The commands are:

sudo pacman -Syu
sudo pacman -S package-name

Here, -Syu synchronizes the package databases and upgrades installed packages, while -S installs a new package. To install Vim:

sudo pacman -S vim

Snap and Flatpak: Cross-Distribution Methods

While package managers are distribution-specific, Snap and Flatpak offer a universal approach to software installation. These technologies package applications in a way that they can run on any Linux distribution, reducing dependency conflicts and ensuring consistent performance.

Snap

Developed by Canonical (the company behind Ubuntu), Snap packages are self-contained and include all their dependencies. Snaps are automatically updated in the background and are sandboxed for security. To install a Snap package, you first need to ensure Snap is enabled on your system (it’s often pre-installed on Ubuntu).

sudo snap install package-name

To give you an idea, to install the Discord chat app:

sudo snap install discord

Flatpak

Flatpak is another cross-distribution packaging system that focuses on security and isolation. It allows developers to distribute applications independently of the Linux distribution. To install a Flatpak package, you may need to enable the Flatpak repository first (it’s often included by default on many distros) Simple, but easy to overlook..

flatpak install flathub package-name

Take this: to install Spotify from Flathub (the main Flatpak app store):

flatpak install flathub com.spotify.Client

Both Snap and Flatpak can also be used via graphical software centers, making them accessible to non-technical users.

Compiling from Source

Sometimes, you might need to install software that isn’t available in the official repositories or as a Snap/Flatpak. In such cases, compiling from source is a viable option. This process involves downloading the source code and building the executable on your machine.

Real talk — this step gets skipped all the time.

Here’s a general outline of the steps:

  1. Install Build Tools: Ensure you have a compiler (like GCC) and other build essentials. On Debian/Ubuntu, you can install them with:

    sudo apt install build-essential
    
  2. Download the Source Code: This is usually a .tar.gz or .tar.bz2 file from the project’s official website or repository.

  3. Extract the Archive:

    tar -xzf package-name.tar.gz
    cd package-name
    
  4. Configure and Compile: Most projects use a configure script to check for dependencies and set up the build environment. Then, use make to compile the code Small thing, real impact..

    ./configure
    make
    
  5. Install the Program: Finally, install the compiled software with:

    sudo make install
    

Compiling from source gives you the latest version and control over build options, but it can be more complex and time-consuming than using package managers.

Using Graphical Software Centers

For users who prefer a graphical interface, most Linux distributions come with a built-in software center. These applications provide a user-friendly way to browse, install, and update software without touching the command line.

  • Ubuntu Software: The default app store on Ubuntu, which includes both APT and Snap packages.
  • GNOME Software: Available on many GNOME-based distributions, it supports Flatpak and traditional packages.
  • KDE Discover: The software center for KDE Plasma environments, offering APT, Snap, and Flatpak support.

Simply open the software center, search for the application you want, and click “Install.” The tool will handle all the technical details behind the scenes Most people skip this — try not to. Took long enough..

Manual Installation via .deb and .rpm

Occasionally, you might download a .In real terms, deb (for Debian/Ubuntu) or . rpm (for Red Hat/Fedora) file directly from a website Small thing, real impact..

To install a .deb file on Debian-based systems, you can use dpkg followed by apt to resolve dependencies:

sudo dpkg -i package-name.That said, deb
sudo apt --fix-broken install

Alternatively, modern tools like apt can handle . deb files directly while managing dependencies:

sudo apt install .Because of that, /package-name. On the flip side, deb

Similarly, on RPM-based systems like Fedora or RHEL, dnf (or yum on older versions) can install . rpm files and pull in required dependencies:

sudo dnf install package-name.So rpm

While this method provides quick access to specific vendor-provided packages, it carries risks: manually downloaded packages lack automatic security updates, may conflict with repository versions, and bypass dependency verification. Even so, always verify the source’s authenticity and prefer official repositories when possible. For proprietary software (e.Which means g. Consider this: , Zoom, Slack), . But deb/. rpm files are often the primary distribution method, but checking for Snap/Flatpak equivalents first is advisable for better integration and updates.

Conclusion

Linux offers a rich ecosystem of installation methods, each suited to different scenarios. For routine updates and stable software, distribution repositories via apt, dnf, or pacman remain the gold standard—ensuring security, dependency integrity, and seamless updates. When seeking newer versions or cross-distribution apps, Snap and Flatpak provide dependable sandboxed alternatives, accessible both via command line and graphical interfaces. Compiling from source empowers developers and enthusiasts needing up-to-date features or custom builds, though it demands greater technical engagement. Graphical software centers and direct .deb/.rpm installation bridge gaps for user convenience, particularly with proprietary tools, but should be approached with caution regarding maintenance and security. At the end of the day, the flexibility to choose—whether prioritizing simplicity, control, or compatibility—embodies Linux’s strength. By understanding these pathways, users can confidently deal with software management, tailoring their approach to the task at hand while maintaining a stable and secure system. The key lies in matching the method to the need: repositories for daily use, universal packages for breadth, source for precision, and graphical tools for accessibility—all contributing to a resilient and adaptable computing experience Simple, but easy to overlook..

Fresh Picks

What's New Today

Close to Home

Up Next

Thank you for reading about How To Install Programs On Linux. We hope the information has been useful. Feel free to contact us if you have any questions. See you next time — don't forget to bookmark!
⌂ Back to Home