Commands for configuration and management of software in Linux (Debian/Ubuntu and RHEL/Rocky/Alma/CentOS)
|
Command
|
Purpose
|
apt install |
Install package
|
apt remove |
Remove package
|
apt purge |
Remove package and configuration
|
apt autoremove |
Remove unused dependencies
|
apt update |
Update package index
|
apt upgrade |
Update installed packages
|
apt full-upgrade |
Upgrade including dependency changes
|
dpkg -i |
Install local
.deb package |
dpkg -r |
Remove package
|
dpkg -l |
List installed packages
|
|
Command
|
Purpose
|
apt update |
Refresh repositories
|
add-apt-repository |
Add repository
|
/etc/apt/sources.list |
Main repository file
|
|
`/etc/apt/sources.list.d/
|
Additional repositories
|
|
Command
|
Purpose
|
dnf install |
Install package
|
dnf remove |
Remove package
|
dnf update |
Update packages
|
dnf upgrade |
Upgrade packages
|
dnf search |
Search packages
|
dnf info |
Package information
|
dnf list installed |
Installed packages
|
rpm -i |
Install RPM
|
rpm -e |
Remove RPM
|
rpm -q |
Query package
|
|
Command
|
Purpose
|
dnf repolist |
List repositories
|
dnf config-manager |
Manage repositories
|
/etc/yum.repos.d/ |
Repository files
|
|
Command
|
Purpose
|
dnf update --exclude=PKG |
Skip package update
|
apt-mark hold PKG |
Prevent package upgrades
|
apt-mark unhold PKG |
Allow upgrades again
|
|
Command
|
Purpose
|
systemctl start |
Start service
|
systemctl stop |
Stop service
|
systemctl restart |
Restart service
|
systemctl reload |
Reload configuration
|
systemctl enable |
Enable at boot
|
systemctl disable |
Disable at boot
|
systemctl status |
View service status
|
|
Technology
|
Description
|
|
Snap
|
Canonical package format
|
|
Flatpak
|
Desktop application packaging
|
|
AppImage
|
Portable application
|
|
Location
|
Purpose
|
/etc |
System configuration
|
/etc/default |
Default service settings
|
/etc/sysconfig |
RHEL configuration
|
/usr/share/doc |
Documentation
|
|
Command
|
Purpose
|
update-alternatives --config NAME |
Select default program
|
|
`update-alternatives --display NAME
|
Show available alternatives
|
alternatives --config NAME |
RHEL equivalent
|
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.