Linux Basics/Package management

From Wikibooks, open books for an open world
Jump to navigation Jump to search

What is Package Management?[edit | edit source]

With package management, a special program called a Package manager is used to install, update, and remove applications. While it's still possible to install programs outside the package manager, the package manager can reduce the day to day work of the user, making it ideal for most software installations on a Linux based system.

One way to think about package management is to compare using an app store instead of downloading a program executable (Like a .exe) from a website. App stores can list installed applications, and update them from a centralized location, while individual programs typically only concern updates with themselves, if they even have an updater function. Unlike an app store, most package managers on Linux distros are completely free, and often predate their proprietary app store counterparts.

Using a package manager[edit | edit source]

There are a number of package managers for Linux, but apt is among the most common, due to its use in Debian and most of its derivatives.

sudo apt update - updating package list under Ubuntu

  • repositories can be added to package list
  • we use apt mostly instead of dpkg under Debian-based Linux.

Program / package installation: apt install / dpkg -i <program>

dpkg won't indicate the dependency, so you have to install those that's not on the system. The dpkg, rpm, apt, apt-get etc. commands have man guides (man = manual)