Day 7 Task: Understanding package manager and systemctl

Day 7 Task: Understanding package manager and systemctl

What is package manager in Linux?

Package manager is an tools in linux, which automates the process of installing, upgrading, configuring and removing the packages in operating systems. there are different types of it.

What is a package in Linux?

A package in Linux is a compressed software archive file containing all the files included with a software application that provides any functionality.

In simple terms, it is an bunch of box which is including all the necessary software information with instructions needed to install the software , upgrade, install and manage it.

Different kinds of Package Managers

There are various kind package managers used in different Linux distributions:

  1. apt (Advance Package Tool): APT (Advanced Package Tool) is a powerful and widely used package manager in the Linux world. It’s the default package manager for Debian-based distributions, including Debian itself, Ubuntu, and Linux Mint.

     sudo apt update # Update package lists
      sudo apt install package_name # Install a package
      sudo apt remove package_name # Remove a package
  2. yum (Yellowdog Updater, Modified): is a package manager primarily used in Red Hat-based Linux distributions such as CentOS, Fedora, and RHEL (Red Hat Enterprise Linux).

      sudo yum install package_name # Install a package
      sudo yum remove package_name # Remove a package
  3. dpkg (Debian Package): DPKG (Debian Package Manager) is a fundamental package management tool for Debian-based Linux distributions, including Debian itself, Ubuntu, and their derivatives. DPKG is a low-level package manager, and while it directly interacts with individual package files, it is often used in conjunction with higher-level package managers like APT for a more user-friendly experience.

      sudo dpkg -i package.deb #Install a package
      sudo dpkg -r package_name #Remove a package
  4. RPM (Red Hat Package Manager): It is Used in Red Hat-based systems such as Red Hat Linux, CentOS, and Fedora. RPM manages packages in these distributions.

      sudo rpm -ivh package.rpm #Install a package
      sudo rpm -e package_name #Remove a package


  1. You have to install docker and jenkins in your system from your terminal using package managers

  2. Write a small blog or article to install these tools using package managers on Ubuntu and CentOS

Docker Installation on Ubuntu

sudo apt update # Update the Package
sudo apt-get install # Install Docker on Ubuntu

Once docker installation is done in your system kindly check status of it executing command systemctl status docker

Once we are ensure docker is active, execute systemctl start docker and systemctl enable docker command.

Jenkins Installation on Ubuntu

Update Package List

Install Java Development Kit (JDK): Jenkins require Java to run.

  •   sudo apt install -y openjdk-11-jdk #Install Java 11
        java --version #Check Java Install or no

Installations of jenkins

  sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \
  echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \ binary/ | sudo tee \
    /etc/apt/sources.list.d/jenkins.list > /dev/null
  sudo apt-get update
  sudo apt-get install jenkins

Enable the Jenkins Service.

  sudo systemctl enable service

Start the Jenkins Service

  sudo systemctl start jenkins
  1. Go to your EC2 Instance then,

  2. Go to security group -> Edit inbound Rules -> Add rule (8080) -> Anywhere-IPv4 -> Save it.

  • ◼️Then copy your EC2 Public IPv4 address, Go to Web Browser & paste [your_ip_Address]

  • ◼️You will get above path, Copy it & go to your terminal, Use cat before path.

    cat /var/lib/jenkins/secrets/initialAdminPassword

  • Paste it. You will get Administrator Password, Paste it on Jenkins Dashborad & click on Continue.

  • After that install jenkins plugins

  • Here is your jenkins dashboard is ready

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).