Linux & shell: Install packages
7 Linux & shell commands: Install packages. Click a command to see what each part does.
Linux & shell: Install packagesIndex
- Whole sheet251
- Navigate & list13
- Create, copy, move, delete13
- View & compare files9
- Permissions & ownership31
- Help & shell basics11
- Users & groups6
- Install packages7
- Package & software versions29
- System info9
- Network basics & SSH10
- Zip & compress4
- Shell operators6
- Processes6
- Files & search8
- Text processing pipelines4
- Disk3
- Network5
- Services & logs6
- Archives & copying4
- Firewall7
- Scheduling: cron & systemd timers6
- Storage, mounts & LVM10
- Kernel, hardware & limits8
- Performance & tracing10
- TLS & certificates8
- Packet capture & network debugging10
- Terminal tools8
Install packages7
sudo apt update && sudo apt upgrade -yRefresh package lists and upgrade (Debian/Ubuntu)What each part does
apt updatedownload the latest package lists (installs nothing)&&only if that workedapt upgradeinstall newer versions of installed packages-yanswer yes to the prompt
sudo apt install -y <package>Install a packageWhat each part does
apt installinstall a package and its dependencies-yno confirmation prompt
sudo apt remove <package>Remove a packageCautionWhat each part does
apt removeuninstall (keeps config files; apt purge removes those too)
apt search <word>Find a packageWhat each part does
apt searchsearch package names and descriptions
apt list --installed | grep <package>Is it installed?What each part does
apt list --installedevery installed package| grep <package>filter to the one you want
sudo dnf install -y <package>Install on RHEL / Fedora / Amazon LinuxWhat each part does
dnf installinstall with the dnf package manager (yum on older systems)-yno prompt
apk add --no-cache <package>Install on Alpine (common in containers)What each part does
apk addAlpine's package manager--no-cachedon't keep the package index: smaller images
Nothing matches.
My DevOps Playbook by Angelo John Calleja