Install Software Packages
Different Linux distributions use different package managers, and although their syntaxes are just different enough to be annoying, they all operate in an almost identical fashion. Common package managers include:
- homebrew (Mac OS X)
- apt (reliably found on Ubuntu and Debian-based systems, even minimal ones that don’t have aptitude installed)
- pacman (Arch)
- apk (Alpine)
Your workflow will usually be “search for package” and “install package.” Sometimes you’ll want to remove a package.
Update your local cache of repository state
- homebrew:
brew update
- apt:
apt update
- pacman:
pacman -Sy
- apk:
apk update
Upgrade all packages that have available updates
- homebrew:
brew upgrade
- apt:
apt upgrade
- pacman:
pacman -Syu
- apk:
apk upgrade
Search for package
- homebrew:
brew search $PACKAGENAME
- apt:
apt search $PACKAGENAME
- pacman:
pacman -Ss $PACKAGENAME
- apk:
apk search $PACKAGENAME
Install package
- homebrew:
brew install ...