β Day 6 of My Cloud Journey β Linux Package Managers π§

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 forservice
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!
Subscribe to my newsletter
Read articles from Pratik Das directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
