Ravi Sir's Cyber Security Cards › Revision Cards
Package Management: yum and apt
Package Management: yum and apt A package manager installs and updates software. apt on Ubuntu/Debian. yum (or dnf) on Amazon Linux. Ubuntu: sudo apt install git . Amazon Linux: sudo yum install git . Install only from official repositories . Random .deb/.rpm files or “curl | bash” scripts can carry

Read card text
What this card says
What it is
A package manager installs and updates software.
apt on Ubuntu/Debian. yum (or dnf) on Amazon Linux.
Example
Ubuntu: sudo apt install git.
Amazon Linux: sudo yum install git.
Why it matters for security
Install only from official repositories.
Random .deb/.rpm files or “curl | bash” scripts can carry malware.
Common mistake
Typing apt on Amazon Linux. Check the OS first with cat /etc/os-release.
| Task | Ubuntu / Debian (apt) | Amazon Linux 2023, Amazon… |
|---|---|---|
| Refresh package list | sudo apt update | (automatic) sudo yum makecache |
| Upgrade all | sudo apt upgrade -y | sudo yum update -y |
| Install | sudo apt install -y nginx | sudo yum install -y nginx* |
| Remove | sudo apt remove nginx (purge removes config too) | sudo yum remove nginx |
| Search | apt search php | yum search php |
Learn more in the lesson: 5.7 Package Management: yum and apt