The basic way to install programs on Linux

On Linux, you install most programs through a package manager — a tool built into your system that downloads and installs software for you. You do not usually read installers from websites the way you do on Windows or Mac. Instead, you search for the program by name, and the package manager handles the rest.

The exact steps depend on which Linux version you use. Ubuntu, Linux Mint, Fedora, and Debian each have their own package manager, but they all work the same way: you tell the manager what you want, it finds it, and it installs it. Most of the time you can do this through a graphical app on your desktop. If you prefer typing commands, that works too.

The advantage of using a package manager is that it keeps track of what you installed, handles updates automatically, and removes all the files when you uninstall something. You do not have to hunt for uninstallers or worry about leftover files cluttering your system.

Key Takeaways

  • Ubuntu, Linux Mint, and Debian use a package manager called APT, while Fedora uses DNF — both work through a graphical app on your desktop or through typed commands.
  • The graphical app is usually called Software Center, Software Manager, or GNOME Software, and it is the simplest way to install programs if you are new to Linux.
  • If you use the command line, the command for Ubuntu and Debian is sudo apt install programname, and for Fedora it is sudo dnf install programname.
  • Some programs are not in the standard package manager but are available as Flatpak or Snap packages, which work across different Linux versions.
  • You can uninstall programs the same way you installed them — through the graphical app or by typing a command — and the package manager removes all related files.

Installing programs through the graphical app

The easiest way to install a program is through the software app that comes with your Linux desktop. On Ubuntu and Linux Mint, this is usually called Software Center or Software Manager. On Fedora, it is called GNOME Software. Open this app the same way you open any other program — click the Activities button or the app menu and search for it by name.

Once the app is open, use the search box at the top to type the name of the program you want. For example, if you want to install Firefox, type "Firefox". The app will show you a list of matches. Click the one you want, and a details page will open showing what the program does, how much space it takes, and a button that says Install or Get.

Click that button. The system will ask for your password — this is a security step to make sure you are the person who owns the computer. Type your password and press Enter. The app will then read and install the program. This can take anywhere from a few seconds to a few minutes depending on the program size and your internet speed. When it is done, the button will change to say Open or Remove.

The program is now installed and ready to use. You can open it from the same app, or you can close the software app and find the program in your regular app menu.

Installing programs from the command line

If you prefer typing commands, or if a program is not showing up in the graphical app, you can install it through the terminal. Open the terminal app — usually found in your app menu or by right-clicking on the desktop. Type a command and press Enter.

On Ubuntu, Linux Mint, and Debian, the command is:

sudo apt install programname

On Fedora, the command is:

sudo dnf install programname

Replace "programname" with the actual name of the program. For example, to install a text editor called gedit, you would type sudo apt install gedit on Ubuntu. The system will ask for your password. Type it and press Enter. The terminal will show you what it is downloading and installing, and when it is done, you will see a new command prompt.

If you are not sure of the exact name of the program, you can search for it first. On Ubuntu and Debian, type apt search keyword where keyword is part of the program name. On Fedora, type dnf search keyword. This will show you a list of programs that match.

Finding programs that are not in the standard package manager

Most common programs are in your Linux system's standard package manager, but some are not. If you search for a program and cannot find it, it might be available as a Flatpak or Snap package instead. These are universal packages that work across different Linux versions.

To install a Flatpak, open the graphical software app and search for the program name. If it shows up with a Flatpak label, click Install the same way you would for a regular program. If you want to use the command line, type flatpak install flathub programname. You may need to install Flatpak support first if your system does not have it — the software app will tell you if that is the case.

Snap packages work similarly. Search for the program in the software app, and if it shows up as a Snap, click Install. From the command line, type snap install programname. Snap is usually already installed on Ubuntu, but other Linux versions may need to set it up first.

Flatpak and Snap packages take up more space than regular packages because they include their own copies of shared libraries, but they are useful when a program is not available any other way.

Updating and removing programs

Your Linux system checks for updates to installed programs regularly and can install them automatically, or you can update them yourself. In the graphical software app, look for an Updates tab or button. Click it to see which programs have newer versions available, and click Update All to install them all at once, or click the update button next to individual programs.

From the command line on Ubuntu and Debian, type sudo apt update followed by sudo apt upgrade. On Fedora, type sudo dnf upgrade. The first command checks what updates are available, and the second one installs them.

To remove a program you no longer want, open the software app, find the program in your installed list, and click the Remove or Uninstall button. The system will ask for your password, and then it will delete the program and all its files. From the command line, type sudo apt remove programname on Ubuntu and Debian, or sudo dnf remove programname on Fedora.

What to do if installation fails

Sometimes a program will not install, usually because the package manager cannot find it or because your system is missing a required library. If the graphical app shows an error, try searching for the program by a different name — some programs have multiple names or are listed under a category name instead.

If you are using the command line and see an error like "package not found", double-check the spelling of the program name. You can search for it first using apt search or dnf search to see the exact name the package manager uses. If the program truly is not available, check the program's official website to see if it offers a Flatpak or Snap version, or if it has instructions for Linux installation.

If you see an error about permissions or the system being locked, wait a few minutes — your system may be running another update in the background. If the error persists, restart your computer and try again.

Frequently Asked Questions

Is it safe to install programs from the standard package manager?

Yes. The programs in your Linux system's official package manager have been checked by the people who maintain that Linux version. They are much safer than downloading random installers from the internet. Flatpak and Snap packages are also generally safe, though they are maintained by different groups.

Why do some programs ask for my password when I install them?

Installing programs requires permission to change system files, so Linux asks for your password to confirm you are the person who owns the computer. This is a security feature. Never type your password if you do not recognize the program or the source.

Can I install programs from Windows on Linux?

No. Windows programs are written for Windows and will not run on Linux. However, many popular programs like Firefox, LibreOffice, and GIMP have Linux versions that you can install the same way. If a program you want only exists for Windows, you may be able to run it using a compatibility layer like Wine, but that is more advanced.

What is the difference between apt, dnf, Flatpak, and Snap?

APT and DNF are the standard package managers for different Linux versions — APT for Ubuntu and Debian, DNF for Fedora. Flatpak and Snap are universal packages that work across different Linux versions. Standard packages are usually smaller and faster, while Flatpak and Snap are useful when a program is not in the standard manager.

Do I need to restart my computer after installing a program?

Usually not. Most programs are ready to use when ready after installation. A few system-level programs may require a restart, and the package manager will tell you if that is the case.