# Understanding Package Manager and systemctl in Linux

## **Package Manager in Linux -**

### **Introduction**

In the Linux ecosystem, a package manager is a vital tool that simplifies the installation, removal, upgrading, configuration, and management of software packages on the operating system. It streamlines the process of handling software dependencies, ensuring smooth installation and maintenance of applications.

### 📦 **What is a Package?**

Imagine a package as a gift box 🎁 that contains everything needed to run a software smoothly. Inside this box, you'll find the software itself, configuration files, and even a list of friends (dependencies) it needs to have around to work properly.

### 📦 **Functions of Package Manager**

![](https://cdn.hashnode.com/res/hashnode/image/upload/v1689958684985/df6b5e7f-dd46-4d8b-98a7-b65a82855674.png align="center")

### 📦 **Different Kinds of Package Managers**

There are different package managers for different Linux families:

* **Debian-based Systems**: They use `dpkg` as the superhero who directly installs and removes packages. But it has some sidekicks too, like `apt-get` and `aptitude`, who help resolve dependencies and provide a friendly interface. 😎
    
* **Red Hat-based Systems**: They trust `RPM`, another champion package manager. It used to work with its pal `yum`, but now it hangs out with the cooler `DNF` in newer CentOS and Fedora versions. 🤠
    
* **Arch Linux and Friends**: Here, we have the cool kid `Pacman`, the package manager that keeps things simple and straightforward. 😎
    

So, depending on which Linux family you belong to, you'll have different package managers to make your life easier!

---

## **Installing Docker and Jenkins using Package Managers**

To install Docker and Jenkins on Ubuntu, follow these steps:

Docker 🐳 :

```bash
sudo apt-get update
sudo apt-get install docker.io
```

Jenkins :

```bash
sudo apt-get update
sudo apt-get install jenkins
```

---

## **Systemctl and systemd**

### **Introduction**

systemctl is a command-line utility used to interact with the "systemd" system and service manager. systemd is a crucial component in modern Linux distributions, responsible for booting the system, managing services, and handling various system processes.

### **systemctl vs. service**

Both systemctl and service are used for managing services in Linux, but they have some differences:

* **systemctl**:
    
    * Controls services using the systemd init system.
        
    * Provides more advanced features and capabilities.
        
    * Allows for finer control over services, including managing service units, targets, and dependencies.
        
    * E.g., `systemctl status docker` - Check the status of the Docker service.
        
* **service**:
    
    * Controls services using the older init system or upstart.
        
    * More basic compared to systemctl.
        
    * Generally, works on older Linux distributions.
        
    * E.g., `service docker status` - Check the status of the Docker service using the older service command.
        

---

Thanks For Reading | Stay Connected 😊

LinkedIn : [https://www.linkedin.com/in/akashpawar11/](https://www.linkedin.com/in/akashpawar11/)
