Day 7 Task: Understanding package manager and systemctl

Day 7 Task: Understanding package manager and systemctl

Package Manager:

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 on It’s FOSS. To understand package manager, you must understand what a package is.

Different kinds of package managers

There are several different package managers used in Linux, each with its own set of features and capabilities.

  • APT: Advanced Package Tool is a command-line tool used on Debian-based distributions, such as Ubuntu and Debian itself.

  • YUM/DNF: Yellowdog Updater, Modified (YUM) and Dandified YUM (DNF) are command-line tools used on Red Hat-based distributions, such as Fedora and CentOS.

  • Pacman: Pacman is a command-line tool used on Arch Linux and its derivatives.

  • Zypper: Zypper is a command-line tool used on openSUSE and SUSE Linux Enterprise.

  • Portage: Portage is a package manager used on Gentoo Linux.

  • Snap: Snap is a package manager used on Ubuntu and other Linux distributions.

  • Flatpak: Flatpak is a package manager used on various Linux distributions.

What is Package?

A package is usually referred to 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.

what it contains?

  1. Software Binaries

  2. METADATA

  3. Configuration Files

e.g.docker installation:apt-get install docker.io

cd bin-Where all installed apps present.

ls and check if respective app installed or not.

Check docker version:

Check NGINX version:

systemctl status docker

d-for daemon processed which runs in background.

Jenkins installations:

https://www.digitalocean.com/community/tutorials/how-to-install-jenkins-on-ubuntu-22-04

Prerequities:Check if Java is installed or not.

JAVA installation:

sudo apt install default-jre

sudo apt install default-jdk

This is the Debian package repository of Jenkins to automate installation and upgrade. To use this repository, first add the key to your system:

curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key | sudo tee \
  /usr/share/keyrings/jenkins-keyring.asc > /dev/null
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
  https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
  /etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt-get update
sudo apt-get install jenkins

Sudo apt-get update

sudo apt-get install Jenkins

sudo systemctl start jenkins

sudo systemctl status jenkins

Finally successfull jenkins installation:

sudo systemctl stop jenkins

sudo systemctl start jenkins

service jenkins status

systemctl and systemd

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

systemctl vs service:

Systemctl and service are both command-line tools used for managing services in Linux systems.
The systemctl command manages both system and service configurations, enabling administrators to manage the OS and control the status of services. systemctl is useful for troubleshooting and basic performance tuning.
The service command starts, stop and restart a daemon or services by calling the script. Usually, all scripts are stored in /etc/init. d directory. It runs a script in as predictable environment as possible.

systemctl provides a more efficient and powerful way to manage services, as well as other system resources such as timers and sockets.

Thank you for reading!! Hope you find this helpful.

#day07challenge#90daysofdevops

Always open for suggestions..!!

Thankyou Shubham Londhe !!