βœ… Day 6 of My Cloud Journey ☁ Linux Package Managers 🐧

Pratik DasPratik Das
3 min read

Today, I explored package managers in Linux β€” tools that make software installation, updates, and maintenance seamless in cloud servers. These are super important when working with EC2, Docker, Jenkins, and more.


πŸ“š Table of Contents


What is a Package Manager in Linux? 🐧

A package manager is a tool that simplifies installing, updating, and removing software on Linux.

🧠 It handles:

  • Software installation

  • Dependency management

  • Updates

  • Configuration

  • Removal

Types:

  • Graphical (GUI): With a user interface

  • Command-line (CLI): Used in cloud and DevOps work πŸ’»


What is a Package? πŸ“¦

A package is a compressed archive that contains:

  • Binary files (executable programs)

  • Config files

  • Dependency information

Packages differ across distros β€” .deb for Debian/Ubuntu and .rpm for RedHat-based systems.


Examples of Package Managers in Linux 🐧

1. apt (Advanced Package Tool) – Debian/Ubuntu

Install a package:

sudo apt install nginx

Update all packages:

sudo apt update && sudo apt upgrade

Remove a package:

sudo apt remove nginx

2. yum (Yellowdog Updater Modified) / dnf 🐾 – RHEL/CentOS/Fedora

Install a package:

sudo yum install httpd       # Old systems
sudo dnf install httpd       # Newer Fedora

Update packages:

sudo dnf update

Remove a package:

sudo dnf remove httpd

πŸ§ͺ Tasks: Real-world Linux Service Management

Now that I understand package managers, I also practiced using systemctl to manage services:

🐳 Task 1: Check Nginx Service Status

sudo systemctl status nginx

βš™οΈ Task 2: Manage Jenkins Service

sudo systemctl start nginx
sudo systemctl stop nginx
sudo systemctl restart nginx

πŸ“š Task 3: systemctl vs. service

  • systemctl is the modern replacement for service in systemd-based distros.

  • Example comparison:

sudo systemctl status nginx     # systemd
sudo service nginx status       # SysVinit

πŸ€– Task 4: Automate Service Management

sudo systemctl enable nginx   # Start on boot
sudo systemctl disable nginx  # Don't start on boot

πŸ” Task 5: Analyze Logs

bashCopyEditjournalctl -u nginx   # View logs for a specific service

🌟 Final Thoughts

Understanding package managers and service management is essential for anyone working with cloud platforms like AWS. Whether you're installing NGINX, starting Jenkins, or managing Docker these tools make life easier.

Let’s keep building β˜πŸš€
Follow for more daily cloud learnings!

1
Subscribe to my newsletter

Read articles from Pratik Das directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Pratik Das
Pratik Das