Linux uses package managers to install programs, not download wizards
On Windows and Mac, you download a file and run an installer. Linux works differently. Instead of hunting for downloads, you tell your system's package manager what program you want, and it fetches and installs the right version automatically. The package manager also handles updates and removes old files when you uninstall.
Which package manager you use depends on your Linux distribution. Ubuntu and Debian use apt. Fedora and Red Hat use dnf. Arch uses pacman. The commands are slightly different, but the idea is the same: you open a terminal and type a single line to install what you need.
This guide covers the most common distributions. If you are unsure which one you have, open a terminal and type cat /etc/os-release — the output will tell you.
Key Takeaways
- Ubuntu and Debian users install programs by opening a terminal and typing sudo apt install programname, then entering their password when prompted.
- Fedora and Red Hat users use sudo dnf install programname instead, with the same password step.
- You can search for a program's exact name using apt search keyword or dnf search keyword before installing.
- The package manager downloads and installs the program and all its dependencies in one step, then you can launch it from your applications menu or terminal.
- Removing a program uses sudo apt remove programname or sudo dnf remove programname, and the package manager cleans up leftover files.
Installing programs on Ubuntu and Debian
Open a terminal. On most Ubuntu systems, press Ctrl+Alt+T. A black or white window will open where you can type commands.
Type this command, replacing programname with the actual program you want:
sudo apt install programname
Press Enter. The system will ask for your password — this is the same password you use to log in. Type it (you will not see the letters appear) and press Enter again. The package manager will now download and install the program. This can take anywhere from a few seconds to a few minutes depending on the program's size and your internet speed.
Once the installation finishes, the program is ready to use. You can launch it by searching for its name in your applications menu, or by typing its name in the terminal and pressing Enter.
If you are not sure of the program's exact name, search first. Type apt search keyword where keyword is part of what you are looking for. For example, apt search text editor will show you all text editors available. Find the one you want, note its exact name, then use the install command above.
Installing programs on Fedora and Red Hat
The process is nearly identical to Ubuntu, but Fedora and Red Hat use dnf instead of apt. Open a terminal and type:
sudo dnf install programname
Enter your password when prompted. The package manager will download and install the program the same way apt does on Ubuntu.
To search for a program first, use dnf search keyword. The output will show you available programs and their descriptions, so you can find the exact name you need.
What to do if the installation fails
The most common reason an installation fails is that the package manager's list of available programs is out of date. Fix this by updating the package list first. On Ubuntu and Debian, type sudo apt update. On Fedora and Red Hat, type sudo dnf check-update. Then try the install command again.
If the program still will not install, the package may not exist in your distribution's repository, or it may have a different name than you expect. Try searching again with a different keyword. If you still cannot find it, the program may only be available as a Snap package or Flatpak, which are different installation methods — most distributions support these as alternatives to the standard package manager.
If you see an error about permissions or a locked database, another program is using the package manager. Wait a minute and try again. If the error persists, restart your computer.
Updating and removing programs
The package manager keeps track of every program you install. To update all your programs at once, use sudo apt upgrade on Ubuntu and Debian, or sudo dnf upgrade on Fedora and Red Hat. This downloads and installs the latest versions of everything.
To remove a program, use sudo apt remove programname or sudo dnf remove programname. The package manager will delete the program and clean up most of its leftover files. If you want to remove the program and its configuration files completely, use sudo apt purge programname on Ubuntu and Debian.
Common programs and their package names
Program names in the package manager are not always what you expect. Here are some frequently installed programs and their correct names:
| What You Want | Package Name |
|---|---|
| Firefox web browser | firefox |
| GIMP image editor | gimp |
| VLC media player | vlc |
| LibreOffice (word processor and spreadsheet) | libreoffice |
| Blender 3D software | blender |
| Python programming language | python3 |
| Git version control | git |
When in doubt, use the search command for your distribution. It is faster than guessing.
Frequently Asked Questions
Do I need to restart my computer after installing a program?
No. Most programs are ready to use immediately after installation. The only exception is system-level software that changes how your operating system works — these are rare, and the package manager will tell you if a restart is needed.
What does "sudo" mean and why do I need it?
Sudo means "superuser do" and it tells Linux to run the command with administrator privileges. Installing programs requires this level of access because they affect the whole system, not just your user account. That is why you have to enter your password.
Can I install multiple programs at once?
Yes. Type sudo apt install program1 program2 program3 (or use dnf on Fedora), separating each program name with a space. The package manager will install all of them in one go.
What if a program I want is not in the package manager?
Some programs are only available as Snap packages or Flatpak files. Both are alternative installation methods that work on most Linux distributions. You can also download and compile programs from source code, though this is more complex and usually unnecessary for everyday software.
How do I know if a program installed correctly?
If the terminal returns to the command prompt without error messages, the installation succeeded. You can verify by searching for the program in your applications menu or by typing its name in the terminal. If it launches, it is installed.