1. Basics

CommandMeaning
catConcatenate files and print on the stdout
cdChange working directory
chmodChange file permission bits
chownChange file owner and group
cpCopy files
duEstimate file space usage
echoDisplay a line of text
fileDetermine file type
findSearch for files in a directory hierarchy
grepPrint lines that match patterns
headOutput the first part of files
idPrint real and effective user and group IDs
killSend a signal to a process
lessDisplay file contents one screen at a time
lnMake links between files
lsList directory contents
manShow manual pages
mkdirMake directories
mvMove (rename) files
nanoText editor
psReport a snapshot of the current processes
pwdPrint name of current working directory
python3CPython, version 3
readlinkPrint resolved symbolic links or canonical file names
rmRemove files
sleepDelay for a specified amount of time
tailOutput the last part of files
topProvide a dynamic real-time view of a running system
vimText editor
whichLocate a command
whoamiPrint effective user name

1.1. Signal codes

#NameDescriptionDefaultDumpCatchBlock
1HUPHangupTerminateNoYesYes
2INTInterruptTerminateNoYesYes
3QUITQuitTerminateYesYesYes
7BUSBus errorTerminateYesYesYes
9KILLKillTerminateNoNoNo
10USR1User-defined 1TerminateNoYesYes
11SEGVSegm. faultTerminateYesYesYes
12USR2User-defined 2TerminateNoYesYes
15TERMSoftware term.TerminateNoYesYes
18CONTCont. after stopIgnoreNoYesNo
19STOPStopStopNoNoNo
20TSTPKeyboard stopStopNoYesYes

2. System and service management

CommandMeaning
journalctlPrint log entries from the systemd journal
systemctlControl systemd
systemd-analyzeAnalyze and debug systemd

2.1. systemctl

SubcommandArgumentMeaning
daemon-reloadn/aReload unit files and systemd config
disableunitPrevent unit from activating at boot
enableunitEnable unit to activate at boot
get-defaultn/aShow the default target
isolatetargetChange operating mode to target
killpatternSend a signal to units matching pattern
list-timerspatternList the timer units matching pattern currently in memory
list-unit-filespatternList the unit files matching pattern installed in the system
list-unitspatternList the units matching pattern currently in memory
rebootn/aReboot the computer
restartunitRestart unit immediately
startunitActivate unit immediately
statusunitShow the status of unit and recent logs
stopunitDeactivate unit immediately

2.2. systemd-analyze

SubcommandArgumentMeaning
calendarexpressionParse a calendar repetitive event expression, output the normalized form, and calculate when next occurrences
timespanexpressionParse a time span expression and output the normalized form and the equivalent value in microseconds

3. Account administration

3.1. Root privileges

CommandMeaning
suAllows commands to be run with a substitute user and group ID
sudoExecute a command as another user
visudoEdit the sudoers file with syntax validation

3.2. Users and groups

CommandMeaning
chageChange user password-aging metadata
groupaddCreate a new group
groupdelRemove a group
passwdChange user password
useraddCreate a new user account
userdelRemove a user account
usermodModify an existing user account
vipwEdit the password file with locking

4. Container management

CommandMeaning
podmanManage containers and images

4.1. podman

SubcommandArgumentMeaning
buildn/aBuild an image from a Containerfile
execcontainerRun a command in running container
image prunen/aDiscard images not referenced by any container
imagesn/aList locally stored images
psn/aShow running containers
pullimagePull image from a registry
pushimagePush image to a registry
rmcontainerRemove stopped container
rmiimageRemove image
runimageCreate and start a container from image
startcontainerStart stopped container
stopcontainerStop running container
tagimageAdd a name and tag to image

5. Network configuration

CommandMeaning
ipShow and manipulate routing, network devices, interfaces, and tunnels
iptablesAdminister IPv4 packet filtering and NAT
ncOpen arbitrary TCP or UDP connections
pingSend ICMP echo request to network hosts
ssDump socket statistics
sysctlConfigure kernel parameters at runtime
tcpdumpDump traffic on a network
traceroutePrint the route packets trace to network host

5.1. ip

SubcommandArgumentMeaning
addressn/aShow network interface addresses
neighn/aShow ARP cache entries
routen/aShow routing table

5.2. IPv4

5.2.1. Address classes

Class1st byteImplicit netmaskUse case
A0 - 127255.0.0.0 (/8)Large networks
B128 - 191255.255.0.0 (/16)Medium networks
C192 - 223255.255.255.0 (/24)Small networks
D224 - 239n/aMulticasting
E240 - 255n/aExperimental addresses

5.2.2. Private addresses

IP classFromToCIDR range
A10.0.0.010.255.255.25510.0.0.0/8
B172.16.0.0172.31.255.255172.16.0.0/12
C192.168.0.0192.168.255.255192.168.0.0/16

6. Manual pages

PageTopic
man:systemd.unit(5)[Unit] and [Install] section directives
man:systemd.service(5)[Service] section directives
man:systemd.timer(5)[Timer] directives and calendar expressions
man:sudoers(5)Sudoers file syntax
man:iptables(8)iptables command-line syntax
man:iptables-extensions(8)iptables match modules (e.g., conntrack)

Licenses