Where Linux apps come from and why the method matters
Linux apps install differently than Windows or Mac apps because Linux doesn't have a single app store run by one company. Instead, most Linux distributions use a package manager — a tool built into your system that downloads and installs software from repositories (collections of programs maintained by your distribution or trusted third parties). The method you use depends on which Linux distribution you're running and what app you need.
The most common and safest way to install apps is through your distribution's official package manager. This matters for security because the package manager verifies that software comes from a trusted source and hasn't been tampered with. Installing from random websites or using unofficial methods bypasses those checks and exposes your system to malware or compromised versions of legitimate programs.
If you're new to Linux, you likely have either Ubuntu, Fedora, Linux Mint, or Debian — each uses a different package manager. Knowing which one you have takes 30 seconds and determines which commands you'll use.
Key Takeaways
- Find out which Linux distribution you're running by opening the terminal and typing lsb_release -a or checking Settings — this determines which package manager commands to use.
- Ubuntu, Linux Mint, and Debian use apt; Fedora uses dnf; each has its own command syntax, so using the wrong one won't work.
- The safest method is always the official package manager for your distribution, because it verifies software authenticity and handles security updates automatically.
- If an app isn't in your distribution's repositories, Flatpak and Snap are sandboxed alternatives that work across distributions and update themselves.
- The terminal looks intimidating but installing through it is faster and more reliable than hunting through graphical menus once you know the command.
Identify which Linux distribution you're running
Open the terminal (search for "Terminal" in your applications menu or press Ctrl+Alt+T on most distributions). Type this command and press Enter:
lsb_release -a
The output will show your distribution name and version number. Write down the distribution name — it's the one word that matters. If the terminal says "command not found," try opening Settings, looking for "About," and finding the OS name there instead.
The three most common distributions are Ubuntu (and its variants like Linux Mint), Fedora, and Debian. Each uses a different package manager, so this step determines everything that follows. If you're unsure, Ubuntu is the most common starting point for new Linux users.
Install apps using your distribution's package manager
Once you know your distribution, open the terminal again. The command structure is almost always: sudo [package-manager-name] install [app-name]. The sudo part means "do this with administrator permission" — Linux will ask for your password, which won't show on screen as you type it.
For Ubuntu, Linux Mint, and Debian, use apt. To install an app called Firefox (as an example), type:
sudo apt install firefox
For Fedora, use dnf instead:
sudo dnf install firefox
Press Enter and wait. The package manager downloads the app and its dependencies (other software it needs to run), then installs everything automatically. When it finishes, the app is ready to use — you'll find it in your applications menu or launch it from the terminal by typing its name.
If you don't know the exact name of the app you want, you can search. In Ubuntu or Debian, type apt search [keyword] to see what's available. In Fedora, use dnf search [keyword]. This shows you the official name to use in the install command.
Update your system and installed apps regularly
Your package manager also handles security updates. Once a week or so, open the terminal and run:
sudo apt update && sudo apt upgrade (for Ubuntu, Mint, or Debian)
sudo dnf upgrade (for Fedora)
The first command checks for new versions; the second installs them. This is critical for security — updates patch vulnerabilities that hackers exploit. Many Linux distributions can do this automatically in the background, which you can set up in Settings under Updates or Software.
Unlike Windows or Mac, Linux doesn't nag you to restart after updates, but some updates (especially kernel updates) do require a restart to take effect. The system will tell you if one is needed.
Use Flatpak or Snap when an app isn't in your repositories
Sometimes an app you want isn't in your distribution's official repositories. Two alternatives exist: Flatpak and Snap. Both are sandboxed containers that run apps in isolation from the rest of your system, which adds a security layer. They work across all distributions, so you don't have to worry about which one you're running.
Flatpak is generally preferred by experienced users because it's more transparent about what permissions apps request. To install Flatpak on Ubuntu or Debian, type:
sudo apt install flatpak
Then install an app with:
flatpak install [app-name]
Snap comes pre-installed on Ubuntu. To install an app with Snap, type:
snap install [app-name]
Both update themselves automatically, so you don't have to manage them separately. The tradeoff is that Flatpak and Snap apps take up more disk space and start slightly slower than traditionally packaged apps, but the security benefit and convenience often make it worthwhile.
Avoid installing from websites or using unofficial methods
You may find instructions online telling you to read a .deb file from a website, or to add a "PPA" (Personal Package Archive), or to compile software from source code. These methods work, but they bypass the security checks your package manager provides. A compromised website or malicious PPA can install malware without your knowledge.
If an app isn't in your official repositories and isn't available on Flatpak or Snap, the safest next step is to check the app's official website and see if they maintain their own repository for your distribution. Legitimate projects like Google Chrome or Microsoft's repository do this — they're trustworthy because they're the actual developers. Random third-party repositories are not.
If you're ever unsure whether a method is safe, ask in a Linux community forum like r/linux or your distribution's support channel. People there can tell you whether a particular app or repository is legitimate.
Remove apps you no longer need
To uninstall an app, use the same package manager with the remove command. In Ubuntu, Mint, or Debian:
sudo apt remove [app-name]
In Fedora:
sudo dnf remove [app-name]
For Flatpak:
flatpak uninstall [app-name]
Removing apps frees up disk space and reduces the number of programs that need security updates. You can also remove apps through your graphical app store if your distribution has one — the terminal method is just faster once you're comfortable with it.
Frequently Asked Questions
What does "sudo" mean and why do I need it?
Sudo stands for "superuser do" and lets you run a command with administrator permissions. Installing software affects the whole system, not just your user account, so Linux requires administrator permission. You'll be asked for your password once per session, then sudo remembers for a few minutes.
Why doesn't my package manager find an app I know exists?
The app might not be packaged for your distribution, or it might be in a repository that isn't enabled by default. Try searching on Flathub (the Flatpak repository) or Snapcraft (the Snap store) instead — they have thousands of apps that work across all distributions. If it's there, use Flatpak or Snap instead of the traditional package manager.
Do I need to restart my computer after installing an app?
Almost never. Most apps are ready to use when ready after installation. The only exception is if the installation includes a kernel update (the core of the operating system), which requires a restart — the system will tell you if this happened.
What's the difference between Flatpak and Snap?
Both are sandboxed containers that work across distributions. Flatpak is more transparent about app permissions and is preferred by privacy-conscious users. Snap is pre-installed on Ubuntu and integrates more tightly with the system. For most users, either works fine — use whichever has the app you need.
Is it safe to install apps from the terminal?
Yes, as long as you're using your distribution's official package manager or trusted alternatives like Flatpak and Snap. The terminal itself is just a tool — what matters is where the software comes from. Official repositories are actually safer than downloading from websites because they verify authenticity.