Day 8: Understanding Package Manager and Systemctl
Understanding Package Management
Package Manager: A package manager is a tool that simplifies the process of installing, updating, uninstalling, and managing software packages on an operating system. Examples include apt-get for Debian-based systems, yum for Red Hat-based systems, and dnf as an enhanced version of yum.
What is a Package? A package is a bundle that contains software, tools, or libraries. It can be either a command-line interface (CLI) or graphical user interface (GUI) application. A package typically includes:
Data: The actual software or tool.
Metadata: Information about the package, such as version, description, and maintainer.
Dependencies: Information about other packages required for the software to work correctly.
Different Kinds of Package Managers
1. apt (Advanced Package Tool):
Usage: Debian, Ubuntu
Command Example:
apt-get install package-nameFeatures: Handles package installation, updates, and removal efficiently, resolving dependencies automatically.
2. yum (Yellowdog Updater, Modified):
Usage: Red Hat, CentOS
Command Example:
yum install package-nameFeatures: Manages RPM packages, resolving dependencies and handling package updates.
3. dnf (Dandified Yum):
Usage: Fedora, Red Hat, CentOS
Command Example:
dnf install package-nameFeatures: An improved version of
yumwith better dependency management, faster performance, and additional features.
Understanding systemctl and systemd
systemctl: systemctl is a command-line tool used to control the systemd system and service manager. It can be used to start, stop, enable, disable, and check the status of services.
systemd: systemd is an init system used to bootstrap the user space and manage system processes after booting. It provides a range of functionalities including service management, device management, and logging.
Key Functions:
Service Management: Using
systemctlcommands to manage services.Boot Management: Handling the system boot process.
Logging: Using
journalctlto view logs.
Example Commands:

Check Service Status:
systemctl status dockerStart a Service:
systemctl start dockerEnable a Service at Boot:
systemctl enable docker