Package manager, systemctl &systemd

Package manager, systemctl &systemd

Understanding Package Managers in Linux

In the world of Linux, package managers play a pivotal role in simplifying software management. But what exactly is a package manager? In the simplest of terms, it's a versatile tool that empowers users to seamlessly install, remove, upgrade, configure, and oversee software packages within an operating system. Package managers come in various flavors, including user-friendly graphical applications like software centers and command-line utilities like apt-get or pacman.

If you've ever delved into Linux tutorials or articles, you've likely encountered the term 'package' frequently. To fully grasp the concept of a package manager, it's essential to comprehend what a package is.

Unpacking the Notion of a Package

A package is typically associated with an application, but it encompasses a broader scope. It can be an intuitive GUI application, a robust command-line tool, or even a vital software library that other programs depend on. Essentially, a package is an archive file that bundles together the binary executable, configuration files, and sometimes information about its dependencies.

Exploring Diverse Package Managers

The landscape of package managers in the Linux world is diverse and multifaceted. Different packaging systems may have more than one package manager tailored to their specific needs.

For instance, when dealing with the RPM packaging system, you'll encounter package managers like Yum and DNF. On the other hand, the DEB packaging system offers package management through tools like apt-get and aptitude, both of which can be accessed through the command line.

Putting Knowledge into Action

Now that we've demystified the concept of package managers and packages, let's dive into some practical tasks:

1. Installing Tools with Package Managers on Ubuntu

To install essential tools like Docker and Jenkins on Ubuntu, you can rely on the apt-get package manager. Open your terminal and execute the following commands:

  • Install Docker:

    Step 1: updating system

  • Step2: Installing CA- certificate

  • Step 3: Adding GPG key to the official docker repository

  • Step 4: Add official repository to APT.

  • Step 5: Make sure you are about to install from the Docker repo instead of the default Ubuntu repo:

  • Step 6: Install the docker

  • Step 7: To check the status of the docker

  • Let's Install Jenkins:

2. Checking Docker Service Status

You can monitor the status of the Docker service on your system using the systemctl command. In your terminal, run:

3. Managing the Jenkins Service

Before and after screenshots can help you visualize the changes in the Jenkins service. Capture the state of the Jenkins service using screenshots before and after stopping it.

Jenkins Service status before stop

After service stop:

4. Understanding systemctl vs. service

In the realm of Linux service management, two key players are systemctl and systemd. Let's explore the differences:

  • systemctl

    is the modern tool of choice on systems using the Systemd init system, which has become the default for numerous Linux distributions like Fedora, Red Hat Enterprise Linux, and Ubuntu. It offers advanced features and a unified interface for managing not just services but also other system components like sockets, devices, and mount points.

  • systemd

    in contrast, is the older tool employed in systems with the System V init system, which was the previous standard for various Linux distributions. Its capabilities are more limited compared to systemctl, focusing solely on service management with less advanced syntax and options.

systemctl commands :

systemctl start

systemctl stop

systemctl restart

systemctl enable

systemctl disable

systemctl status

service commands :

service start

service status

service stop

service restart

Thanks,

Kishor Chavan