Package Management and Systemctl in Linux
Day 07 #90daysofdevopschallenge

Hi there! My name is Yashswini and I'm a Linux Engineer with 3 years of experience in automation, continuous integration, and deployment. My expertise lies in DevOps and Cloud Computing with a focus on AWS. I have hands-on experience in various tools and technologies related to infrastructure automation, managed services, containerization, and monitoring and logging. I have a passion for troubleshooting and resolving issues and I'm always eager to learn and explore new technologies
What is a Package Manager
In Linux Package Managers are essentially software applications that help users to: Search, Download, Install, Remove and Update software applications on their computer operating system. These can be either Command Line tools or a complete Graphical User Interface application
These package sources are referred to as repositories. Using a package manager users will automatically download the appropriate, package from a configured repository, install it and complete all the required configuration tasks
What are Packages
In Linux a package is a compressed software archive file that contains all the files that comes with a software application that delivers any kind of functionality, this can be any kind of command line utility, GUI application or software library.
A package may consist of a binary executable, configuration file and other software dependencies. Common types of Linux packages include .deb, .rpm, and .tgz. Linux packages don't usually contain the dependencies necessary to install them, therefore Linux distributions use package managers to automatically read dependencies files and download the packages needed before proceeding with the installation.
List of Package Manager
There are several types of package managers available in different Linux distributions. Here are some commonly used types:
APT (Advanced Package Tool): APT is a package manager commonly used in Debian-based distributions such as Debian and Ubuntu. It uses the
.debpackage format and includes tools likeapt-getandaptitudeto handle package installation, upgrade, removal, and dependency management.YUM (Yellowdog Updater, Modified): YUM is a package manager primarily used in RPM-based distributions such as Fedora, CentOS, and RHEL. It uses the
.rpmpackage format and includes commands likeyumanddnf(Dandified YUM) to manage packages, resolve dependencies, and handle updates.RPM (Red Hat Package Manager): RPM is a package manager used by Red Hat-based Linux distributions, such as Red Hat Enterprise Linux (RHEL), CentOS, and Fedora. RPM installs remove and manage packages and their dependencies.
DNF (Dandified YUM): DNF is a next-generation version of YUM, and it is used by Fedora and CentOS 8 and later versions.
Pacman Package Manager – Pacman is the package manager used by Arch Linux and its derivatives. It is a command-line package manager that can handle dependencies and perform system upgrades.
2. You have to install docker and Jenkins in your system from your terminal using package managers
Docker Installation
To install Docker using the package manager in Linux, you can follow these general steps.
- Update package lists: Start by updating the package lists to ensure you have the latest versions of packages available. Use the following command:

- Now install the docker package

- First, give the permission to docker to run without the sudo command, then reboot the machine after checking the command with docker and checking the docker version

- check the systemctl status of the docker

- Verify Docker installation: After the installation completes, you can check if Docker is installed and running by running the following command

Jenkins Installation
To install Jenkins on Ubuntu, you can follow these steps:
Update the package list for upgrades and installations:

Install Java Development Kit (JDK). Jenkins requires Java to run. You can install OpenJDK, which is an open-source implementation of Java:

- Verify the Java installation by checking the version:

A new release is produced weekly to deliver bug fixes and features to users and plugin developers. It can be installed from the
debianapt repository.
Install Jenkins:

Check the status of Jenkins service:

stop the service Jenkins and post before and after screenshots


After completing the setup, you can start using Jenkins for your continuous integration and deployment needs.

Read about the commands systemctl vs service
Service: Service is a command that provides a simple interface to manage services on Linux systems. It is a backward-compatible command that has been used for a long time and works with the older init system (
SysV init). It is still present on modern Linux distributions for compatibility reasons.
Systemctl: systemctl is a command-line tool that is part of the
systemdinit system, which has become the default on many modern Linux distributions. It provides more advanced functionality for managing services and offers additional features such as service dependency tracking, logging, and control groups.
Check the docker status using both systemctl/service


Here we wrap our session and have a good knowledge of package management and system service management via systemctl/service ...
Happy Learning.!!



![Jenkins Freestyle Project for DevOps Engineers[Day-23 Task]](/_next/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1690291895202%2Fc7012bdd-d2f6-44e4-8d64-6d071c0c7c39.png&w=3840&q=75)
