How Software Works on Linux
Installing apps on Linux is different from Windows, but once you get it, it's actually easier.
The Big Idea
On Windows, you download an installer from a website and run it. On Linux, you usually install software through a package manager — think of it like an app store, but built into your system and run from the terminal.
You type a command like sudo apt install firefox and the package manager:
- Finds the software in a trusted online catalog (no sketchy downloads)
- Downloads it along with anything else it needs to work
- Installs everything in the right place
- Keeps it updated when new versions come out
Different Linux distros use different package managers, but they all do the same job. Which one you have depends on which distro you're using.
sudo mean? It stands for "super user do" — it's like clicking "Run as administrator" on Windows. You need it when installing or removing software because those actions affect the whole system.
Which Package Manager Do I Have?
| If you're using... | Your package manager is... | Install command |
|---|---|---|
| Ubuntu, Mint, Debian, Pop!_OS, Kali | APT | sudo apt install app-name |
| Fedora, Rocky Linux, RHEL | DNF | sudo dnf install app-name |
| Arch, Manjaro, EndeavourOS | pacman | sudo pacman -S app-name |
| openSUSE | zypper | sudo zypper install app-name |
| NixOS | Nix | nix profile install nixpkgs#app-name |
| Void Linux | XBPS | sudo xbps-install app-name |
Don't know which distro you have? Open a terminal and try apt --version or dnf --version — whichever one doesn't give an error is the one you're using.
The Commands You'll Actually Use
Here are the everyday commands side by side. Pick the column that matches your distro.
| What you want to do | APT (Ubuntu/Mint) | DNF (Fedora) | pacman (Arch) | zypper (openSUSE) |
|---|---|---|---|---|
| Update everything | sudo apt update && sudo apt upgrade |
sudo dnf upgrade |
sudo pacman -Syu |
sudo zypper update |
| Install an app | sudo apt install name |
sudo dnf install name |
sudo pacman -S name |
sudo zypper install name |
| Remove an app | sudo apt remove name |
sudo dnf remove name |
sudo pacman -R name |
sudo zypper remove name |
| Search for an app | apt search name |
dnf search name |
pacman -Ss name |
zypper search name |
| See info about an app | apt show name |
dnf info name |
pacman -Si name |
zypper info name |
| Clean up unused stuff | sudo apt autoremove |
sudo dnf autoremove |
sudo pacman -Rns $(pacman -Qdtq) |
sudo zypper rm -u |
Package Manager Details
Click any section below to see more commands and tips for your specific package manager.
APT — Ubuntu, Mint, Debian, Pop!_OS, Kali, Parrot, Tails
APT is the most widely-used package manager in the Linux world. If you're on Ubuntu or Mint, this is what you're using.
# Always run this first — it refreshes the list of available software
sudo apt update
# Then upgrade everything that has a newer version
sudo apt upgrade
# Install something
sudo apt install neovim
# Install multiple things at once
sudo apt install git curl wget
# Remove something
sudo apt remove firefox
# Remove something AND its settings files
sudo apt purge firefox
# Clean up leftover stuff from removed apps
sudo apt autoremove
# Search for something
apt search "text editor"
# See what's installed
apt list --installed
Adding extra software sources
Sometimes the software you want isn't in the default catalog. You can add extra sources (called PPAs) to get more software:
# Add a new software source
sudo add-apt-repository ppa:user/repo
sudo apt update
# Remove one
sudo add-apt-repository --remove ppa:user/repo
Only add PPAs from sources you trust — they're maintained by community members, not your distro's official team.
What's the difference between "apt" and "apt-get"?
You might see tutorials using apt-get instead of apt. They do the same thing — apt is just the newer, friendlier version. Use apt for day-to-day use.
DNF — Fedora, Rocky Linux, RHEL, AlmaLinux
DNF is used by Fedora and the Red Hat family of distros. It's modern and fast.
# Update everything (this also refreshes the software list automatically)
sudo dnf upgrade
# Install something
sudo dnf install neovim
# Remove something
sudo dnf remove firefox
# Search
dnf search "text editor"
# See info about a package
dnf info neovim
# See what's installed
dnf list installed
# Install a whole group of related software at once
sudo dnf group install "Development Tools"
# Undo the last install/remove (handy if you messed something up)
sudo dnf history undo last
# Clean up cached downloads
sudo dnf clean all
Enabling extra software (RPM Fusion)
Fedora doesn't include some software by default for legal reasons (video codecs, NVIDIA drivers, etc.). RPM Fusion is a trusted extra source that fills the gap. Most Fedora users enable it right away:
sudo dnf install \
https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
pacman — Arch Linux, Manjaro, EndeavourOS, Garuda
pacman is fast and powerful, but its commands use short flags instead of words, which takes a little getting used to.
# Update everything (always do this before installing new stuff)
sudo pacman -Syu
# Install something
sudo pacman -S neovim
# Remove something and clean up anything it left behind
sudo pacman -Rns firefox
# Search for something
pacman -Ss "text editor"
# See info about a package
pacman -Si neovim
# See what's installed
pacman -Q
# Find which app owns a specific file
pacman -Qo /usr/bin/nvim
# Remove leftover packages that nothing depends on anymore
sudo pacman -Rns $(pacman -Qdtq)
# Clear the download cache
sudo pacman -Sc
The AUR (community software repository)
The AUR (Arch User Repository) is a massive collection of software contributed by the community. It has basically everything — if a program exists for Linux, it's probably in the AUR.
To use it easily, install a helper tool called yay:
# Install yay (one-time setup)
sudo pacman -S --needed git base-devel
git clone https://aur.archlinux.org/yay.git
cd yay && makepkg -si
# Now use yay just like pacman — it searches both official and AUR packages
yay -S spotify
yay -S google-chrome
yay -Syu # Updates everything including AUR packages
zypper — openSUSE
zypper is openSUSE's package manager. It's straightforward and similar to DNF.
# Refresh the software list
sudo zypper refresh
# Update everything
sudo zypper update
# Install something
sudo zypper install neovim
# Remove something
sudo zypper remove firefox
# Search
zypper search "text editor"
# openSUSE Tumbleweed (rolling release) uses a different upgrade command
sudo zypper dup
Nix — NixOS (also available on any Linux distro)
Nix works very differently from other package managers. Every piece of software is completely isolated, which means you can easily undo changes, have multiple versions of the same software, and never break your system by installing something.
# Search for something
nix search nixpkgs neovim
# Install something
nix profile install nixpkgs#neovim
# Try something without actually installing it
nix run nixpkgs#cowsay -- "Hello from Nix"
# Open a temporary shell with specific tools available
nix shell nixpkgs#python3 nixpkgs#nodejs
NixOS system management
On NixOS, you don't install software the normal way. Instead, you edit a configuration file that describes your entire system, then tell NixOS to apply the changes. This means you can always go back to a previous setup if something goes wrong.
# Edit the system configuration
sudo nano /etc/nixos/configuration.nix
# Apply the changes
sudo nixos-rebuild switch
# Go back to the previous version of your system
sudo nixos-rebuild switch --rollback
Portage (emerge) — Gentoo
Portage is unique: instead of downloading pre-built software, it downloads the source code and builds it on your computer. This lets advanced users fine-tune exactly what features each piece of software includes, but it takes longer to install things.
# Update the software catalog
sudo emerge --sync
# Install something (this compiles from source, so it takes a while)
sudo emerge neovim
# Update everything
sudo emerge --update --deep --newuse @world
# Search
emerge --search neovim
XBPS — Void Linux
XBPS is Void Linux's package manager. It's fast and lightweight.
# Update and upgrade everything
sudo xbps-install -Su
# Install something
sudo xbps-install neovim
# Remove something (and clean up what it left behind)
sudo xbps-remove -R firefox
# Search
xbps-query -Rs "text editor"
# See info about a package
xbps-query -S neovim
Flatpak: One App Store for Every Distro
No matter which distro you're on, Flatpak lets you install desktop apps from a single catalog called Flathub. Think of it like the App Store or Google Play, but for Linux.
Apps installed through Flatpak run in a sandbox — they're isolated from the rest of your system, which makes them safer. Many distros come with Flatpak built in (Fedora, Mint). If yours doesn't:
# Install Flatpak
sudo apt install flatpak # Ubuntu/Debian
sudo dnf install flatpak # Fedora (usually already installed)
# Connect to Flathub (the main app catalog)
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
# Install an app
flatpak install flathub org.mozilla.firefox
# Update all Flatpak apps
flatpak update
# See what you have installed
flatpak list
Other cross-distro app formats
| Format | How it works | Notes |
|---|---|---|
| Flatpak | Install from Flathub, apps run in a sandbox | Most popular. Used by Fedora, Mint, and many others. |
| Snap | Similar to Flatpak, made by Canonical (Ubuntu's company) | Default on Ubuntu. Can also package command-line tools, not just desktop apps. |
| AppImage | A single file you download and run — no installation needed | Just download, make it runnable (right-click > Properties > Permissions > check "Execute"), and double-click it. |