Skip to main content

Command Palette

Search for a command to run...

Day 7 - Understanding package manager and systemctl

90DaysOfDevOps

Published
โ€ข3 min read
Day 7 - Understanding package manager and systemctl
A

A passionate Linux user and FOSS promoter from India. I like playing around systems and networking. Despite having tried a bunch of programming languages, python and golang remain my favourties.

Also checkout a FOSS community by my university students - https://foss.coep.org.in/cofsug/

Installing an application before Linux:

Browser -> enter search query -> find relevant/trusted websites -> find compatibility with device (64-bit, 32-bit, architecture, etc) -> download -> double-click -> Agree T&C -> next-next-next... -> install

Pretty convenient, isn't it? ๐Ÿ˜’๐Ÿ˜’

Installing a package on Linux/UNIX-based system:

sudo <package-manager> <command> <package-name>

For e.g. to download VLC media player in linux...

sudo apt install vlc    # on Debian-based distros
sudo pacman -S vlc      # on Arch-based distros
sudo dnf install vlc    # on Fedora-based distros

This installs the software directly on your machine. It is ready-to-use now. No more tedious long process to just install/remove/update an application.

Formally defining a package manager:

๐Ÿ’ก
A package manager in Linux is a software-tool which is assists in searching, downloading, installing, uninstalling and perform other software-management related operations like configuring, updating, etc.

Thus, a package manager is a life-saver tool for system-adminstrators, devops and automation engineers and general developers who love Linux the most because of the comfort of 1. the command line and 2. package managers.

In the example above, apt is a package manager for Debian-based distros; pacman for Arch-based distros while dnf is for Fedora/RedHat based distros.

Since Debian-family is most known and I have been on Debian-based distros myself for a long time, I would like to explain the further part with apt.

Installation of neofetch on Debian-based distros (apt package-manager)

Before proceeding, check if it is installed already.

neofetch --version

If the version is displayed, it is installed on your system, else if any error prompts, you gotta install it. Else, to check, you can also do whereis neofetch on your terminal.

  1. Update the local list!!! (important so as to sync it with latest software versions on the Debian-mirrors)

     sudo apt update
    
  2. Search for the keyword that may exist in the package name(here neofetch)

     apt search neofetch
    

  3. If it shows positive results for the search, find yourself the complete name of the package. Here the one before the "/" character is the required package name. Following it is the status(stable) with version and other information is displayed. Now you simply have to take that name and install it:

     sudo apt install neofetch
    

  4. Check if it is installed:

     neofetch --version
    

Tasks:

Install Docker

  • Having followed the above steps, docker can be easily installed.
    Since it was already installed on mine, I didn't do the process again, it's only typing actually :)

Install Jenkins

The installation process of Jenkins is pretty different as package for Jenkins is not available yet. Still it pretty well documented on their official website.
The final status of successful installation as reached by following the steps mentioned on the official website is as shown in the image below.

Systemctl and systemd

Very well, I didn't expect that to come like that in this course, but yeah I will post a link to a blog that I have already published on dev.to. This blog is actually a sequel to this one right here - error.

Make sure to read throught it as well :)

Stop the service Jenkins and post screenshots

Before:

After:

Thus, Jenkins service has stopped.

It was a little heavy learning today I suppose, but it's just beginning... It's only getting interesting as we progress. See you on the next one ๐Ÿค—.

Happy Learning ;)

90DaysOfDevOps

Part 7 of 22

In this series, I will be posting my progress in the 90DaysOfDevOps course by ShubhamLondhe at https://github.com/LondheShubham153/90DaysOfDevOps/tree/ac73ed9242e1dc450313a14a1b91db3

Up next

Day 8 - Basic Git & GitHub for DevOps Engineers

90DaysOfDevOps