This is a living document of useful Linux system administration commands and notes.
Ubuntu
Glossary
- PPA (Personal Package Archive). An Ubuntu-specific repository on Launchpad that anyone (often Ubuntu developers or community teams) can use to publish and maintain packages that aren't (or aren't yet) in the official Ubuntu archives.
- Launchpad. A web-based platform developed and maintained by Canonical (the creators of Ubuntu) for collaborative software development, especially focused around the Ubuntu ecosystem.
Ubuntu software packages
- Ubuntu repository components
main
: Free and open-source software fully supported by Canonical.restricted
: Supported software that is not open-source, but still maintained (e.g. NVIDIA drivers).universe
: Community-maintained open-source software. Canonical does not guarantee support.multiverse
: Software that is not free (e.g. proprietary codecs, games) and not officially supported.
- Ubuntu update pockets
release
: The base release (e.g., Ubuntu 22.04 GA).updates
: Stable updates after release (bug fixes, minor enhancements).security
: Security fixes maintained by the Ubuntu Security Team.backports
: Newer versions of packages backported from newer Ubuntu releases.proposed
: Testing area before updates reachupdates
orsecurity
.
Adding repositories
Useful repositories
- Rust tools APT repo
- https://github.com/emmatyping/apt.cli.rs
dpkg
# search which package provides a specific file
dpkg -S $FILENAME_SEARCH_PATTERN
APT
# Search for a package
apt-cache search $PACKAGE
# Show details of a package
apt-cache show $PACKAGE
# Use apt-file to list contents of packages
sudo apt-get install apt-file
sudo apt-file update
apt-file list $PACKAGE
AlmaLinux 9+ (RHEL)
dnf
# get access to dnf repoquery, config-manager, and other subcommands
sudo dnf install dnf-plugins-core
dnf search "$PACKAGE"
# find packages and which repository they are found in
dnf list available "*$TERM*"
# find what files (binaries and libraries) are provided by a package
dnf repoquery -l "$PACKAGE"
dnf repoquery --info "$PACKAGE"
# groups
dnf group list --ids
dnf group list --hidden
sudo dnf module info $MODULE:$STREAM
# e.g. sudo dnf module info nvidia-driver:570-dkms
PCIe
sudo dnf install pciutils