Installing software on Linux means using your distribution's package manager instead of downloading installers from websites

Most Linux distributions come with a built-in tool that handles software installation for you. On Ubuntu and Debian-based systems, that tool is called apt. On Fedora and Red Hat systems, it is dnf. On Arch Linux, it is pacman. These tools download software from repositories — curated collections of programs that have been tested to work with your system — and install everything in the right place automatically.

You do not need to hunt for download links or worry about whether you are getting the right version. You open a terminal, type a single command, and the package manager handles the rest. This is faster and safer than downloading from random websites, because the software comes from sources your distribution maintains.

Key Takeaways

  • Every Linux distribution includes a package manager — a tool that installs software from trusted repositories without requiring you to find download links.
  • Ubuntu and Debian use apt, Fedora uses dnf, and Arch uses pacman, but they all work the same way: search, install, and update from the command line.
  • Before installing anything new, run an update command to refresh your package list so you get the latest versions available.
  • If a program is not in your distribution's repositories, you can add third-party repositories or download and compile from source code, though the package manager route is simpler.

How to use apt on Ubuntu and Debian

Open a terminal and run sudo apt update first. This refreshes the list of available software on your system. The sudo prefix means "run this as administrator" — you will be asked for your password.

Once the update finishes, search for the program you want by typing sudo apt search firefox (replace "firefox" with whatever you are looking for). The output shows you the exact package name and a short description. Then install it with sudo apt install firefox. The package manager downloads the software and all its dependencies — the other programs it needs to run — and sets everything up for you.

To remove software later, type sudo apt remove firefox. To see what you have installed, type apt list --installed. To update all your installed programs to their latest versions, run sudo apt upgrade.

How to use dnf on Fedora and Red Hat

The process is nearly identical on Fedora. Open a terminal and run sudo dnf check-update to refresh your package list. Then search with sudo dnf search firefox and install with sudo dnf install firefox.

To remove software, type sudo dnf remove firefox. To update everything, run sudo dnf upgrade. The command names are slightly different, but the workflow is the same: update, search, install.

How to use pacman on Arch Linux

Arch uses pacman instead of apt or dnf. Refresh your package list with sudo pacman -Sy. Search for software with pacman -Ss firefox (note: no sudo needed for search). Install with sudo pacman -S firefox.

Remove software with sudo pacman -R firefox. Update everything with sudo pacman -Syu. Arch's syntax uses single letters instead of full words, but the idea is identical.

What to do if software is not in your repositories

Not every program lives in your distribution's official repositories. If you cannot find something with search, check the program's website to see if they provide installation instructions for your distribution. Many projects maintain their own repositories that you can add to your system.

For example, if you want Google Chrome on Ubuntu, you can add Google's repository by downloading a small file from their website and running a command to register it. After that, Chrome appears in apt search and installs like any other program. The program's documentation usually tells you exactly how to do this.

If no repository exists, you can download the source code and compile it yourself, but that requires additional tools and is more complex. Start with the package manager and the program's official website before attempting to compile from source.

Understanding dependencies and what gets installed

When you install a program, the package manager automatically installs everything that program needs to run. These are called dependencies. If you install a video editor, it might need libraries for handling different file formats, and the package manager grabs those too.

You do not have to think about this — the package manager handles it. If you later remove that video editor, the package manager can also remove the dependencies it installed, though some distributions keep them around in case another program needs them. You can usually see what will be installed before you confirm, so you know what is happening.

Keeping your system updated

Run your distribution's update command regularly — weekly or monthly is reasonable. On Ubuntu and Debian, that is sudo apt update followed by sudo apt upgrade. On Fedora, it is sudo dnf upgrade. On Arch, it is sudo pacman -Syu.

Updates bring security fixes and new features to the software you already have. Some distributions can be set to update automatically, but checking manually gives you control over when your system restarts if needed.

Frequently Asked Questions

Do I have to use the terminal to install software?

No. Most distributions include a graphical app store where you can search and install software by clicking, just like on Windows or Mac. The terminal method is faster once you learn it, but the app store works fine if you prefer not to type commands.

What is the difference between apt, dnf, and pacman?

They are tools built for different distributions and use different command syntax, but they do the same job: manage software installation and updates. If you switch distributions, you learn a new tool, but the concept stays the same.

Is it safe to install software from repositories?

Yes. Repositories are maintained by your distribution and contain software that has been reviewed. This is safer than downloading random installers from the internet. Third-party repositories are less vetted, so use them only from sources you trust.

What happens if I install two versions of the same program?

Your package manager prevents this by default. If you try to install a program you already have, it will either skip it or offer to upgrade to a newer version. You cannot accidentally end up with conflicting versions.

Can I uninstall software completely?

Yes. The remove command uninstalls the program. Some package managers also have a "clean" or "autoremove" command that removes dependencies nothing else needs, freeing up disk space. Check your distribution's documentation for the exact command.