Understanding Package Manager and systemctl ๐Ÿง๐Ÿ’ป

ยท

3 min read

What is a Package Manager in Linux? ๐Ÿ“ฆ

In simpler words, a package manager is a tool that allows users to install, remove, upgrade, configure, and manage software packages on an operating system. The package manager can be a graphical application like a software center or a command-line tool like apt-get or pacman.

Youโ€™ll often find me using the term โ€˜packageโ€™ in tutorials and articles. To understand a package manager, you must first grasp what a package is.

What is a Package? ๐Ÿ“ฆ

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

Different Kinds of Package Managers ๐Ÿ“ฆ

Package managers differ based on the packaging system, but the same packaging system may have more than one package manager.

For example:

  • RPM has Yum and DNF package managers.

  • For DEB, you have apt-get and aptitude command-line-based package managers.

Tasks ๐Ÿ“‹

  1. Installing Docker and Jenkins Using Package Managers ๐Ÿ‹

Your first task is to install Docker and Jenkins on your system from the terminal using package managers. Below are the commands to achieve this on Ubuntu and CentOS:

On Ubuntu (using apt-get):

sudo apt-get update
sudo apt-get install docker.io -y
sudo apt-get install jenkins -y

On CentOS (using yum):

sudo yum install docker -y
sudo yum install jenkins -y
  1. Write a Small Blog or Article

Write a small blog or article documenting the installation process for Docker and Jenkins on both Ubuntu and CentOS using the package managers mentioned above. Feel free to include any tips or troubleshooting steps you encountered during the installation.

Understanding systemctl and systemd ๐Ÿ› ๏ธ

systemctl is used to examine and control the state of the "systemd" system and service manager. systemd is a system and service manager for Unix-like operating systems (most distributions, but not all).

Tasks ๐Ÿ“‹

  1. Check the Status of Docker Service ๐Ÿ‹

First, check the status of the Docker service in your system to ensure that you have completed the above tasks successfully. Use the following command:

systemctl status docker
  1. Stop the Jenkins Service and Post Before and After Screenshots ๐Ÿ›‘

Stop the Jenkins service on your system using the following command and capture screenshots of the status before and after stopping the service:

sudo systemctl stop jenkins
  1. Read About the Commands systemctl vs service

To better understand the differences between systemctl and service commands, read about their functionalities and use cases. Compare the commands:

systemctl status docker
service docker status

For Reference, read this article.

Let's keep learning and growing! Happy DevOps Journey! ๐Ÿš€๐Ÿ‘ฉโ€๐Ÿ’ป๐Ÿ‘จโ€๐Ÿ’ป

ย