Package Management

Package Management

What is Package management in Linux???

Package management is a system that helps us install, update, upgrade, and remove software on a Linux system. It also helps manage dependencies and check for software updates. We can interact with package management using command-line utilities or a graphical user interface (GUI).

What Package includes?

Packages are archive files that contain various libraries, binary executable files, dependencies, metadata, and other instructions for installing software.

Depending on the system, there are different package managers. Here, we will discuss and understand the package manager for the Ubuntu system.

Package management tool and concept.

  1. APT (Advanced Packaging Tool)

    It automates installing, upgrading, configuring, and removing software from Debian-based systems like Ubuntu.

  2. dpkg (Debian Package)

    APT uses this low-level package management tool to install, configure, and remove deb packages.

  3. Repositories

    Ubuntu maintains online servers where different packages are stored; we can download these packages from there.

Let’s understand some basic commands.

  1. To get the latest information about available packages:

  2. Now, we need to install these packages on our system:

  3. To install software on the system, here we will install Docker and Jenkins:

  4. To check the status of Docker – here Docker's status is Active:

Let's understand what systemctl and systemd are.

systemctl:

It is a command-line tool that helps manage system services and their status using systemd as the system and services manager. Systemctl allows us to manage services (start, stop, enable, disable), state (reboot, shutdown), unit management, and service monitoring (view logs, status).

Here are some commands with systemctl:

  1. To start Docker services with systemctl:

  2. To check the status of Docker services:

  3. To stop Docker services:

  4. To start Docker services with systemctl – shows inactive:

  5. To enable the services at boot, use enable:

  6. To disable the services at boot:

Thank you for your time.

To sum up this article, we covered package management, installed packages, and learned how to use the systemctl tool to manage services.