Understanding package manager and systemctl

Understanding package manager and systemctl

What is a package?

A package is a collection of software files that contains everything needed to install and run a particular software program, including executables, libraries, documentation, and configuration files.

Using packages makes it easy to install and update software Instead of having to manually download and install each component of a software program, the package manager takes care of everything automatically.

What is a package manager in Linux?

A package manager is a tool that allows users to install, remove, upgrade, configure and manage software packages on an operating system. A package manager simplifies the management of software.

Different types of package managers are as follows

  1. yum: This is used in Red Hat-based distributions such as CentOS.

  2. apt: This is used in Debian-based distributions such as Ubuntu.

  3. Pacman: Used in Arch Linux

NetworkStatic | Brent Salisbury's Blog - Page 2 of 23 - Blogging All Things  Networking, Programming and Computing.

Install Docker on Ubuntu

  1. Remove any docker file running on the system using the below command,

    sudo apt-get remove docker docker-engine docker.io

  2. Update the package database,

    sudo apt-get update

  3. Install docker using the below command,

    sudo apt install docker.io

  4. Install all dependency packages,

    sudo snap install docker

  5. You can check the version of docker installed using this command,

    docker --version

  6. To check the docker installation is done correctly you can run the below command,

    sudo docker run hello-world

    By following these steps you can successfully install Docker on Ubuntu.

  7. To check the docker status we can use the below command,

    systemctl status docker OR service docker status

Logo Jenkins | Zend by Perforce

Install Jenkins on Ubuntu

  1. Install Java by using the below command:

    sudo apt install openjdk-11-jdk -y

  2. The below command is used to add the Jenkins repository key to your system:

    wget -q -O - https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo apt-key add -

  3. Add the Jenkins repository to your system:

    sudo sh -c 'echo deb https://pkg.jenkins.io/debian-stable binary/ > /etc/apt/sources.list.d/jenkins.list'

  4. Update your package:

    sudo apt update

  5. Install Jenkins by using the following command:

    sudo apt install jenkins

  6. Now that Jenkins is installed in your system start Jenkins and display the status using the below commands.

    sudo systemctl start jenkins

    sudo systemctl status jenkins

    By following these steps you can successfully install Jenkins on Ubuntu.

systemctl :

systemctl is a command-line utility used in modern Linux distributions that use the systemd init system to manage system services. It allows users to start, stop, restart, reload, enable or disable services, view the status of a service

systemctl start service: This is used to start a service.

systemctl stop service: This is used to stop service.

systemctl restart service: This is used to restart a service.

systemctl enable service : This is used to enable a service to start automatically at boot time

service:

service is a command-line utility used in Linux distributions that use the traditional SysVinit init system to manage system services. It allows users to start, stop, restart, reload, enable or disable services, and view the status of a service.

service service-name start: This command is used to start a service.

service service-name stop: This command is used to stop service.

service service-name restart: This command is used to restart a service.

Thank you for reading the blog.

Suggestions are always welcome. Thank you !!