Package Manager

⭕ What is a software package?

▪ A compressed archive containing all required files for the software to run

▪ Apps usually have dependencies, which need to be installed with it

▪ Files are split across different folders

⭕ Tasks of a Package Manager

▪ Download, install or update existing software from a repository

▪ Ensures the integrity and authenticity of the package

▪ Manages and resolves all required dependencies

▪ Knows where to put all the files in the Linux file system

▪ Easy upgrading of the software

⭕ Package Manager - pre-installed

▪ Package Manager is already included in every Linux distribution

▪ On Ubuntu, you have an APT package manager available

▪ Package Manager, like apt has commands you can use to install, uninstall or upgrade software

⭕ Package Repository

▪ A repository is a storage location, where all the software packages are hosted

▪ Contains thousands of programs

▪ Package Manager fetches the packages from these repositories

Always update the package index before upgrading or installing new packages

┌──(asaf㉿kali)-[~]
└─$ sudo apt update

▪ Pulls the latest changes from the APT repositories

▪ The APT package index is basically a database

▪ Holding records of available packages from the repositories

Alternative Package Manager

There are different package managers available

A very similar package manager is APT-GET, which you will often come across

⭕ APT

▪ Is more user friendly, like progress bar Fewer, but sufficient command options in a more organized way

▪ Recommended by Linux distributions!

⭕ APT-GET

▪ On Ubuntu, APT-GET is also out of the box available

▪ Different set of commands

▪ You can achieve the same user-friendly output if you use additional command options e.g. "apt search" not available

Alternative ways to install software

▪ On Linux, you will mostly use apt package manager

▪ But generally, you need to know different ways to install a software

Why? Because

▪ When there are packages, that are not available in these official repositories

▪ Or package is available, but not the latest version (software packages are verified, before adding to repository, and verification process takes time)

▪ Programs, which are not available: Browsers, Code editors, etc.

⭕ Snap Package Manager

▪ Snap is a software packaging and deployment system

▪ A newer package manager, initial release in 2014

▪ Many still use the term "snappy", which it was called before

▪ A package manager for all OS, which use the Linux kernel

Snap = A snap is a bundle of an app and its dependencies

Snap Store = Provides a place to upload snaps, and for users to browse and install the software

Snapcraft = Is the command and framework used to build and publish snaps

Add repository to official list of repos

▪ Use Case:

● When installing relatively new applications, which are not yet in the official repositories

▪ How to:

● Add the repository, which contains the package to official repositories list

● Often the command is listed in the installation guide of the tool:

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"

● Command adds repository to APT sources (into /etc/apt/sources.list)

● Afterward, you can install the package as usual - the next apt install will look into this new repository as well

Last updated