Linux software installs through package managers, not by downloading .exe files
On Windows or Mac, you download an installer file and click through a setup wizard. Linux works differently. Instead of hunting for download links, you use a package manager — a built-in tool that finds, downloads, and installs software from your system's official repositories. Think of it like an app store that comes with your operating system.
Which package manager you use depends on your Linux distribution. Ubuntu and Debian use apt. Fedora and Red Hat use dnf. Linux Mint uses apt. Arch uses pacman. The commands are slightly different, but the idea is the same: you type a command, the system fetches the software, and it installs automatically.
Most of the software you need is already in these repositories. You do not need to search the web, worry about viruses, or trust random download sites. The repository software has been tested and signed by your distribution's maintainers.
Key Takeaways
- Ubuntu and Debian systems use the apt package manager, which you access through the terminal with commands like sudo apt install program-name.
- You must know the exact package name your distribution uses for the software — the program name and the package name are sometimes different.
- Most installations require you to type your password after running the command, because package management needs administrator permission.
- You can search for available software using apt search keyword before installing, so you know the package exists and what it does.
- If a program is not in the official repositories, you can add third-party repositories, but stick to ones from the software maker or your distribution's community.
Installing software on Ubuntu or Debian with apt
Open the terminal. On Ubuntu, press Ctrl+Alt+T. On other distributions, look for "Terminal" in your applications menu. You will see a black or dark window with a blinking cursor.
Before installing anything new, update your package list so the system knows what versions are available. Type this command and press Enter:
sudo apt update
The word sudo means "do this as administrator." The system will ask for your password. Type it (you will not see the letters appear) and press Enter. This command does not install anything — it just refreshes the list of available software.
Now install the program. If you want to install Firefox, type:
sudo apt install firefox
Press Enter. The system will show you how much space the program needs and ask "Do you want to continue?" Type y and press Enter. The download and installation happen automatically. When it finishes, you will see your cursor again.
The program is now installed. You can launch it from your applications menu or, in some cases, by typing its name in the terminal.
Finding the right package name before you install
The tricky part is that the package name is not always what you expect. The program might be called "Visual Studio Code," but the package might be named code. The text editor might be called "Sublime Text," but it might not be in the default repositories at all.
Before you install, search for the package. Type:
apt search program-name
Replace program-name with what you are looking for. If you want to find a text editor, type apt search text editor. The system will show you every package with those words in its name or description. Each result shows the package name (what you type in the install command) and a short description.
For example, if you search for "python," you will see python3, python3-dev, python3-pip, and many others. Read the descriptions to find the one you need. Most of the time, the main package is the one without extra words at the end.
Once you have the correct package name, use it in your install command. If the search shows the package is available, the install will work.
Installing software on Fedora or Red Hat with dnf
Fedora and Red Hat distributions use dnf instead of apt. The process is nearly identical, but the command name changes.
Open the terminal and update your package list:
sudo dnf check-update
Then install a program the same way:
sudo dnf install firefox
Type your password when prompted, type y to confirm, and the installation proceeds. You can search for packages with:
dnf search program-name
Everything else works the same way as apt. The only difference is the command name.
What to do when a program is not in the official repositories
Some software is not in your distribution's default repositories. This happens with newer programs, proprietary software, or niche tools. You have three options: add a third-party repository, download a pre-built package file, or build the software from source code.
The safest option is to add a repository from the software maker. For example, Google maintains a repository for Chrome on Ubuntu. The software maker's website usually has instructions for adding their repository. You will typically run one command to add the repository, then install normally using apt or dnf.
If the maker does not provide a repository, you can sometimes download a .deb file (for Debian and Ubuntu) or .rpm file (for Fedora and Red Hat) directly from their website. Open your file manager, navigate to the Downloads folder, right-click the file, and select "Open with Software Install" or "Install Package." The system will handle the installation.
Building from source code is the most complicated route and should be your last option. It requires downloading the source code, installing build tools, and running commands to compile the program. Most users do not need to do this.
Removing software you no longer need
If you install something and decide you do not want it, removal is simple. On Ubuntu or Debian, type:
sudo apt remove program-name
On Fedora or Red Hat, type:
sudo dnf remove program-name
Replace program-name with the package name (the same name you used to install it). Type your password, type y to confirm, and the program is removed. Your files and settings are usually left behind, but the program itself is gone.
If you want to clean up leftover configuration files as well, add the --purge flag on Ubuntu or Debian:
sudo apt remove --purge program-name
This is optional and only necessary if you plan never to reinstall the program.
Keeping your system up to date
After you have installed software, your system can update it automatically or on demand. To update all installed programs at once, type:
sudo apt upgrade
on Ubuntu or Debian, or:
sudo dnf upgrade
on Fedora or Red Hat. This downloads and installs the latest versions of everything you have installed. Run this command every week or two to stay current with security patches and bug fixes.
Many Linux systems can be set to update automatically in the background. Check your system settings under "Software" or "Updates" to turn this on. Automatic updates mean you do not have to remember to run the upgrade command yourself.
Frequently Asked Questions
What does "sudo" mean and why do I need it?
Sudo means "superuser do" and lets you run commands with administrator permission. Installing software changes system files, so Linux requires you to prove you are the owner of the computer by typing your password. Without sudo, the install would fail with a "permission denied" error.
Can I install software without using the terminal?
Yes. Many Linux distributions include a graphical app store or software center. You can search for programs, click "Install," and the system handles it without typing commands. However, the terminal method gives you more control and works the same way on every distribution.
What if I type the wrong package name?
The system will tell you the package does not exist and the install will fail. Nothing breaks. Search for the correct name using apt search or dnf search and try again with the right package name.
Is it safe to add third-party repositories?
Repositories from the software maker or your distribution's official community are safe. Avoid random repositories from unknown sources. Stick to repositories linked from the official software website or your distribution's documentation.
How do I know if a program installed correctly?
The terminal will return to the command prompt without error messages. You can also search for the program in your applications menu or type its name in the terminal to launch it. If it opens, the installation worked.