CentOS / Rocky / AlmaLinux

RHEL-based · Command reference

Availability and options depend on your installed release and packages. For guided practice, choose a learning path.

Networking & DNS

digBeginner

Query DNS records directly against a nameserver.

hostBeginner

Simple DNS lookup utility.

ipBeginner

Show and manage network interfaces, addresses and routes.

pingBeginner

Test basic reachability of a host using ICMP.

ssIntermediate

Investigate open sockets and listening ports.

tracerouteIntermediate

Show the network path (hop by hop) to a destination.

Mail Servers (Exim, Postfix)

mailqBeginner

Show the mail queue (Sendmail-compatible front end).

postconfIntermediate

Read or set Postfix main.cf configuration parameters.

swaksIntermediate

Send a test SMTP message from the command line.

File & Directory Management

catBeginner

Print file contents to the screen, or join files together.

cpBeginner

Copy files and directories.

diffIntermediate

Compare two files line by line.

findIntermediate

Search for files matching complex criteria.

headBeginner

Show the first lines of a file.

lnIntermediate

Create hard or symbolic links between files.

lsBeginner

List directory contents.

mkdirBeginner

Create a new directory.

mvBeginner

Move or rename files and directories.

rmBeginner

Remove files and directories.

rsyncIntermediate

Efficiently synchronise files locally or over SSH.

statIntermediate

Display detailed file or filesystem status.

tailBeginner

Show the last lines of a file, optionally following new additions.

tarBeginner

Create and extract archive files.

touchBeginner

Create an empty file, or update a file's timestamp.

wcBeginner

Count lines, words and bytes in a file.

Permissions & Ownership

chgrpBeginner

Change the group that owns a file or directory.

chmodBeginner

Change file and directory permissions.

chownBeginner

Change the owning user (and optionally group) of a file.

getfaclIntermediate

Display the Access Control List of a file or directory.

setfaclAdvanced

Set fine-grained Access Control List permissions.

umaskIntermediate

View or set the default permission mask for new files.

Process & Job Management

jobsBeginner

List background and stopped jobs in the current shell session.

killBeginner

Send a signal to a process, most commonly to terminate it.

nice / reniceIntermediate

Start or adjust a process's scheduling priority.

nohupIntermediate

Run a command immune to hangups, so it keeps running after logout.

psBeginner

Show a snapshot of currently running processes.

topBeginner

Interactive, real-time process viewer.

Package Management

dnfBeginner

Install and manage software on Fedora, RHEL and derivatives.

rpmIntermediate

Low-level package installer for .rpm files.

User & Group Management

groupaddBeginner

Create a new group.

idBeginner

Show a user's UID, GID and group memberships.

passwdBeginner

Set or change a user's password.

suBeginner

Switch to another user account within the current session.

sudoBeginner

Run a single command with another user's (usually root's) privileges.

useraddBeginner

Create a new user account.

userdelIntermediate

Delete a user account.

usermodIntermediate

Modify an existing user account.

System Monitoring & Logs

dmesgIntermediate

Print kernel ring buffer messages.

freeBeginner

Display memory and swap usage.

journalctlIntermediate

Query and follow the systemd journal.

uptimeBeginner

Show how long the system has been running and its load average.

vmstatAdvanced

Report virtual memory, process, CPU and I/O statistics.

wBeginner

Show who is logged in and what they are doing.

Text Processing & Editors

awkAdvanced

Pattern-scanning and text-processing language.

cutBeginner

Extract columns or fields from each line of text.

grepBeginner

Search text for lines matching a pattern.

lessBeginner

View file contents one page at a time.

sedIntermediate

Stream editor for filtering and transforming text.

sortBeginner

Sort lines of text.

Disk & Storage

dfBeginner

Report filesystem disk space usage.

duBeginner

Estimate file and directory space usage.

fdiskAdvanced

View and edit disk partition tables (MBR).

lsblkBeginner

List block devices in a tree view.

mkfsAdvanced

Create a new filesystem on a partition or device.

mountIntermediate

Attach a filesystem to the directory tree.

Systemd & Services

systemctl daemon-reloadIntermediate

Reload systemd's unit configuration from disk.

systemctl enableBeginner

Configure a service to start automatically at boot.

systemctl list-unitsIntermediate

List loaded systemd units and their state.

systemctl start / stopBeginner

Start, stop or restart a service right now.

systemctl statusBeginner

Show the current state of a service or the system.

systemd-analyzeAdvanced

Analyse system boot performance.

Firewall & Security

fail2ban-clientIntermediate

Manage the Fail2Ban intrusion-prevention service.

firewall-cmdIntermediate

Manage firewalld, the default firewall on RHEL-based systems.

getenforce / setenforceAdvanced

Check or change the current SELinux mode.

iptablesAdvanced

Directly configure Linux kernel packet-filtering rules.

ssh-keygenBeginner

Generate SSH key pairs for passwordless, key-based authentication.

Shell & Environment Basics

aliasBeginner

Create a shortcut for a longer command.

cdBeginner

Change the current working directory.

echoBeginner

Print text or the value of a variable.

exportIntermediate

Set an environment variable for the current shell and its child processes.

historyBeginner

Show previously run commands.

manBeginner

Read a command's manual page.

pwdBeginner

Print the current working directory.

whichBeginner

Show the full path of a command that would run.

System & Hardware Info

dmidecodeAdvanced

Read hardware information from the system's DMI/SMBIOS tables.

hostnamectlBeginner

View or set the system hostname and related metadata.

lscpuBeginner

Display CPU architecture information.

lspciIntermediate

List PCI devices attached to the system.

lsusbIntermediate

List USB devices attached to the system.

unameBeginner

Print kernel and system information.

Scheduling & Automation

atIntermediate

Schedule a command to run once, at a specific future time.

crontabIntermediate

Schedule commands to run automatically on a recurring basis.

systemctl list-timersAdvanced

List active systemd timers (the systemd alternative to cron).

watchBeginner

Run a command repeatedly, showing its output full-screen.

Archiving & Compression

bzip2Intermediate

Compress a file using the bzip2 algorithm.

gunzipBeginner

Decompress a .gz file.

gzipBeginner

Compress a file using the gzip algorithm.

unzipBeginner

Extract files from a .zip archive.

xzIntermediate

Compress a file using the xz (LZMA2) algorithm.

zipBeginner

Create a .zip archive.

Remote Access & File Transfer

curlBeginner

Transfer data to or from a URL — HTTP, FTP and more.

scpBeginner

Copy files to or from a remote host over SSH.

sftpBeginner

Interactively browse and transfer files over SSH.

sshBeginner

Log in to a remote system securely.

wgetBeginner

Download files from the web.