1.2 Major Open Source Applications (Weight: 2)
📘Linux Essentials (LPI 010-160)
1. What are Package Management Tools?
A package management tool is a software program that helps you install, update, remove, and manage software on a Linux system.
Think of Linux software as being stored in packages. A package contains the program files, libraries, and instructions needed for the software to run. Package managers handle these packages for you automatically so you don’t have to manually download and install files.
Key Functions of Package Managers:
- Install software – downloads and installs programs.
- Remove software – deletes programs cleanly without leaving unused files.
- Update software – keeps programs up-to-date with latest fixes or features.
- Resolve dependencies – automatically installs extra packages needed by software.
Examples of Package Managers:
| Linux Distribution Type | Package Manager | File Type |
|---|---|---|
| Red Hat, CentOS, Fedora | yum / dnf | .rpm |
| Debian, Ubuntu | apt / apt-get | .deb |
| SUSE | zypper | .rpm |
| Arch Linux | pacman | .pkg.tar.zst |
Tip for the exam: Remember that RPM is the package format used by Red Hat-based systems, and DEB is used by Debian-based systems.
2. What are Repositories?
A repository (repo) is a central storage location on the internet (or a local network) where Linux software packages are kept.
Instead of downloading software randomly from the web, Linux uses repositories to provide trusted and verified software.
Types of Repositories:
- Official Repositories – Maintained by your Linux distribution (e.g., Fedora, Ubuntu). Safe and stable.
- Third-party Repositories – Provided by other organizations or software vendors (e.g., Google Chrome repo). Can contain software not included in the official repos.
- Local Repositories – Stored on a company’s internal network. Useful in IT environments where internet access is limited.
3. How Package Managers Use Repositories
When you run a command like:
sudo apt install nginx
or
sudo yum install httpd
Here’s what happens:
- The package manager checks the repository for the requested package.
- It downloads the package and any other required packages (dependencies).
- It installs the software and updates system records so the software is recognized by Linux.
- If the software needs future updates, the package manager will pull updates from the same repository.
Example in IT environment: A company server needs nginx for web hosting. Using
aptoryum, the system administrator installs nginx from the official repo. Later, when a security patch is released,apt update && apt upgradeensures the server stays secure.
4. Common Commands for Package Managers
Debian/Ubuntu (APT)
- Update package list:
sudo apt update
- Install a package:
sudo apt install package_name
- Remove a package:
sudo apt remove package_name
- Upgrade installed packages:
sudo apt upgrade
Red Hat/Fedora/CentOS (DNF/YUM)
- Update package list:
sudo dnf check-update
- Install a package:
sudo dnf install package_name
- Remove a package:
sudo dnf remove package_name
- Update installed packages:
sudo dnf update
Tip:
yumis used in older Red Hat systems;dnfis its modern replacement.
5. Repository Configuration
Repositories are defined in configuration files:
- Debian/Ubuntu:
/etc/apt/sources.listor/etc/apt/sources.list.d/ - Red Hat/CentOS/Fedora:
/etc/yum.repos.d/contains.repofiles
You can enable, disable, or add new repos using these files.
This is useful in IT when you want to install a software version not in the default repo, like a specific version of PostgreSQL or Docker.
6. Why This is Important in IT
- Security: Packages from repositories are digitally signed and verified.
- Efficiency: Install multiple software packages quickly without manual setup.
- Consistency: All systems in a network can install the same version of software from the same repo.
- Automation: IT teams can script package installations for hundreds of servers.
Example: A system administrator can run a script to automatically install nginx, MySQL, and PHP on 50 servers at once using the package manager and repository commands.
✅ Key Points to Remember for the Exam
- Package managers handle installation, removal, update, and dependencies.
- RPM (Red Hat) and DEB (Debian) are the two main package formats.
- Repositories store software packages. They can be official, third-party, or local.
- Commands differ by package manager:
aptvsdnf/yum. - Repositories are configured via specific files:
sources.list(Debian) or.repofiles (Red Hat). - Package managers ensure secure, efficient, and consistent software management.
