Day 7 - 90 DaysOfDevOps - Understanding package manager and systemctl

Day 7 - 90 DaysOfDevOps - Understanding package manager and systemctl

✨ Introduction -

Package manager in Linux is a tool that automates the process of installing, updating, configuring, and removing software packages on a Linux-based operating system. It handles the Dependencies of the application, version conflicts and system-level configuration required for the application.

There are several package managers available in the Linux ecosystem, and the specific package manager used depends on the Linux distribution being used. Some popular package managers include:

  1. APT (Advanced Package Tool): Used by Debian and its derivatives, such as Ubuntu, Linux Mint, and Debian itself.

  2. YUM (Yellowdog Updater, Modified): Used by Red Hat Enterprise Linux (RHEL), CentOS, Fedora, and other RPM-based distributions.

  3. DNF (Dandified YUM): A newer package manager, the successor of YUM, used in Fedora and RHEL 8+.

  4. Pacman: Used by Arch Linux and its derivatives.

  5. Zypper: Used by openSUSE and SUSE Linux Enterprise.


🪄 What is a package?

A package is usually referred to as an application but it could be a GUI application, command line tool or a software library (required by other software programs). A package is essentially an archive file containing the binary executable, configuration file and sometimes information about the dependencies.


🪄 Task 1 - You have to install docker in your system from your terminal using package managers.

To install Docker:-

  1. To install Docker, first of all, we have to Open the terminal and update the Package Manager repository, So that we have the latest information about the packages.

  2. Install the Docker package using the package manager.

  3. To check whether docker is installed or not.


🪄 Task 2 - Write a small blog or article to install these tools using package managers on Ubuntu.

We have installed Docker in the system using the terminal. The Steps which we have followed are as follows:-

step 1 - In this step, we have updated the system packages to the latest version, so that the latest repositories will be available for us.

step 2 - After updating the package to the latest version, we will install the docker in the system using commands from the terminal.

step 3 - after performing the installation, we need to check whether it is installed successfully or not, so will check this on the terminal.

Step 1 - sudo apt update
Step 2 - sudo apt intsall docker.io
Step 3 - docker --version

✨ systemctl and systemd

systemctl is a command used in Linux operating systems, to manage the systemd system and service manager. systemd is a software suite that provides core functionalities for controlling the startup, management, and control of various aspects of the operating system, including services, devices, sockets, and more.

With systemctl, you can start, stop, restart, enable, disable, reload, and query the status of system services, as well as perform various other operations related to system management.

Some of the common services used are as follows:-

  1. Start Service :

     sudo systemctl start service_name
    
  2. Stop service

     sudo systemctl stop service_name
    
  3. Restart service

     sudo systemctl restart service_name
    
  4. Enable service

     sudo systemctl enable service_name
    
  5. Disable service

     sudo systemctl disable service_name
    
  6. Check the status of a service:

     systemctl status service_name
    

🪄 Task 3 - check the status of the docker service in your system

To check the status of the service. we have to use systemctl command .