Linux Package Management
How do you install and manage software packages in Linux? What's the difference between apt and yum?
Linux Package Management
How do you install and manage software packages in Linux? What's the difference between apt and yum?
Package managers handle software installation, updates, and dependencies. apt (Debian/Ubuntu) and yum/dnf (RHEL/CentOS/Fedora) are the main ones. apt uses .deb packages, yum uses .rpm. Basic commands: apt update && apt install package, yum install package. Both resolve dependencies automatically.
Understanding package management is essential for setting up servers, installing dependencies, and maintaining system security through updates. Different distributions use different package managers, so knowing both apt and yum families is valuable.
apt commands (Debian/Ubuntu)
yum/dnf commands (RHEL/CentOS)
- Forgetting to run apt update before installing new packages
- Running apt upgrade in production without testing first
- Not understanding that apt and yum are for different distros
- What are PPAs and how do you add third-party repositories?
- How would you pin a package to a specific version?
- What's the difference between apt and apt-get?