Linux··3 min

Installing and Managing Software

On Windows you download an installer from a website and run it. On Linux you almost never do that. Instead you use a package manager — and once you understand why, you will not want to go back.

On Windows you download an installer from a website and run it. On Linux you almost never do that. Instead you use a package manager — and once you understand why, you will not want to go back.

What is a package manager?

A package manager is a tool that installs, updates, and removes software on your system. It talks to a central repository — a server maintained by your distribution — that contains thousands of programs ready to install with a single command.

Instead of googling "download VLC", navigating to a website, clicking through an installer, and hoping it does not bundle unwanted software, you just type:

sudo apt install vlc

That is it. The package manager finds the software, downloads it, installs it, and handles any dependencies it needs to run.

Why this is better than downloading installers

A few reasons.

Every package in the official repository has been vetted by the distribution maintainers. You are not downloading executables from random websites and hoping they are safe.

Dependencies are handled automatically. If a program needs another library to run, the package manager installs that too. On Windows, dependency management is largely your problem.

Updating everything on your system is a single command. One line updates the entire OS and every installed program at once.

Removing software is clean. The package manager knows exactly what it installed and removes it properly, instead of leaving leftover files scattered across your system.

The main package managers

Different distribution families use different package managers. This is one of the most practical reasons the family tree from the second post matters.

apt — Debian and Ubuntu based systems

sudo apt update          # refresh the list of available packages
sudo apt upgrade         # install available updates
sudo apt install firefox # install a package
sudo apt remove firefox  # remove a package
sudo apt search vlc      # search for a package by name

Always run apt update before installing something. Without it, apt is working from a cached list that may be outdated.

sudo dnf check-update    # check for updates
sudo dnf upgrade         # install updates
sudo dnf install firefox # install a package
sudo dnf remove firefox  # remove a package
sudo dnf search vlc      # search for a package

pacman — Arch and Arch-based systems

sudo pacman -Syu         # update the system
sudo pacman -S firefox   # install a package
sudo pacman -R firefox   # remove a package
sudo pacman -Ss vlc      # search for a package

Pacman uses flags instead of subcommands. -S is sync (install), -R is remove, -Q is query your local package database.

A practical example

Here is a full workflow on a Debian-based system. You want to install htop, a terminal-based system monitor.

sudo apt update
sudo apt install htop
htop

Three commands. The system is now updated and htop is running.

To remove it later:

sudo apt remove htop

Package managers are one of the things Linux gets genuinely right. Once you are used to installing software this way, going back to hunting for installers on websites feels like a step backwards.

Next up: text editors — how to edit files directly in the terminal without a GUI.

1 views