Linux commands
There is a wide range of commands available for systems running Linux. The overview of Linux commands make it easier to find relevant tools for system administration and includes a short description. For some commands there is a separate page available that describes a command more in detail, such as its purpose, how to install it, and examples of using the command.
Some commands have a cheat sheet available.
Looking for an article where a particular command is used? Have a look at the commands overview page.
Commands overview
Command | Category | Description |
---|---|---|
» A | ||
ab | system benchmarking | Performs HTTP benchmarking and stress testing |
addgroup | authentication | Create new group |
adduser | authentication | Creates a new user |
alias | shell | Define an alias for another command |
apropos | documentation | Find related man pages |
apt | package management | Package manager |
apt-file | package management | Search tool for files belonging to packages |
arch | system information | Shows machine hardware name |
arp | networking | Show or manipulate ARP entries |
arping | networking | Sends a ARP REQUEST to a specified host |
arptables | networking | Manages ARP table of system |
auditctl | auditing | Set and control audit rules within the Linux Audit Framework |
aureport | auditing | Show statistics about events created by the Linux Audit Framework |
ausearch | auditing | Search in events created by the Linux Audit Framework |
awk | data processing | Performs data extraction and reporting from files |
» B | ||
badblocks | storage | Tests a device for bad blocks |
base64 | data processing | Encodes data to base64 or decodes back to its original form |
basename | files | Strips directory and file name suffix from a given path |
basenc | data processing | Encodes and decodes data (e.g. using base64) |
bc | data processing | Calculator for numeric expressions and operations |
bg | tasks | Put a task (job) to the background |
blkdiscard | storage | discards specified device sectors on solid-state drives (SSDs) and thinly-provisioned storage |
blkid | storage | Shows block device information |
blkzone | storage | Runs zone command on device, requires support for Zoned Block Commands (ZBC) or Zoned-device ATA Commands (ZAC) |
blockdev | storage | Allows using block device ioctls to get or set specific settings and values |
bootctl | boot loader | Manages the EFI firmware boot settings for the boot loader |
bridge | networking | Shows or configures information of network interfaces related to bridge addresses |
btop | system resources | Monitors resources such as processor, memory, disks, network, and processes |
busctl | message bus | Connects to D-Bus to query information |
bwrap | sandboxing | Sandboxing tool |
» C | ||
cal | date and time | Shows calendar |
capsh | capabilities | Linux capabilities testing and debugging tool |
captest | capabilities | Capabilities and privilege escalation testing tool |
cat | data processing | Shows contents of files |
chacl | file permissions | Changes the access control list (ACL) of a file or directory |
chattr | files | Changes file attributes |
chfn | authentication | Changes user information |
chmem | memory | Configures memory and allows to set it online or offline |
chmod | file permissions | Sets file permissions |
choom | memory | Show or configure the out-of-memory killer score |
chown | file permissions | Sets file ownership |
chrt | processes | Sets Linux scheduler policy and priority for a process or command |
clear | shell | Clear the terminal |
column | data processing | Formats output into neatly organized tables/columns |
command | commands | Looks for the presence of a command by specified name |
coredumpctl | processes | Lists and processes stored core dumps |
cp | files | Copy a file or if defined a recursive directory structure |
csplit | files | Split a file into multiple sections |
curl | HTTP client | Performs HTTP requests |
cut | data processing | Removes part of lines from a file |
» D | ||
date | date and time | Shows or sets system date and time |
dd | data processing | Converts and copies file data |
devlink | devices | Show or adjust device information and resources that are available via devlink API |
df | storage | Shows used and free disk space |
diff | data processing | Compares two files |
diff3 | data processing | Compares three files |
dig | DNS | Performs DNS requests |
dir | file system | Shows contents of a directory |
dirname | data processing | Strips last part of a path to return the directory name |
dmesg | logging | Shows kernel log messages |
dmidecode | hardware | Shows hardware information |
dmstats | file system | Shows statistics for devices managed by device-mapper |
dnf | software | Install and remove packages, including querying information |
dnscap | networking | Performs capture of DNS traffic |
dnsdomainname | networking | Shows the configured domain name |
dnstop | networking | Shows DNS traffic on the network |
dpkg | software | Install and remove packages, including querying information |
du | file system | Shows disk size usage for paths |
» E | ||
e4crypt | file system | Performs encryption management for ext4 file systems |
ebtables | networking | Manages ebtables (Ethernet Bridge tables), transparent network-traffic filtering |
echo | data handling | Shows text on screen |
eject | storage | Ejects removable storage such as a USB disk |
env | processes | Run a command in a different environment |
expiry | authentication | Checks and enforces the defined password expiration policy |
expr | data processing | Evaluates expressions (e.g. A > B) |
» F | ||
fallocate | files | Reserve file space for a specified file instead of filling it with zeroes |
false | shell | Exits with a "bad" status code indicating success |
fdisk | storage | Makes changes to disk partition table |
fg | tasks | Returns a task (job) from the background back to foreground and making it active |
file | files | Shows the file type of a specified file |
filecap | capabilities | Display of Linux capabilities set on binaries in paths |
find | file system | Searches specified paths or its meta-data |
finger | authentication | Shows information about other users on the system |
firejail | sandboxing | Sandboxing tool for Linux |
free | memory | Shows used and free memory |
fsadm | storage | Resizes a filesystem on a device |
fsck | filesystem | Check a filesystem for consistency |
fstrim | storage | Discards blocks (trim) that are no longer in use by the filesystem and is typically used for SSD drives and thinly-provisioned storage |
fuser | files and sockets | Show processes using a file or socket |
» G | ||
getcap | capabilities | Show file capabilities |
getconf | system information | Shows values of system variables with miscellaneous kinds of information |
getent | authentication | Retrieves entries from NSS (Name Service Switch) libraries |
getfacl | file permissions | Shows file access control lists |
getfattr | filesystem | Shows extended attributes |
getpcaps | capabilities | Show process capabilities |
groupadd | authentication | Creates a new group |
groupdel | authentication | Deletes an existing group |
groupmems | authentication | Allows users to do management for their primary group (unless having superuser permissions) |
groupmod | authentication | Modifies an existing group |
groups | authentication | Shows the groups where the specified user is a member |
grub-install | boot loader | Installs GRUB boot loader on the specified device |
» H | ||
hdparm | storage | Get or set device parameters for IDE and SATA devices |
head | data processing | Show the first number of lines from a file |
history | shell | Shows shell history of executed commands |
host | networking | Performs DNS lookup |
hostid | system information | Shows host identifier of system |
hostname | system information | Shows or sets hostname of system |
hostnamectl | system information | Shows basic information about the system |
» I | ||
id | authentication | Shows your real and effective user and group IDs |
ifconfig | networking | Configures a network interface |
iftop | network | Bandwidth usage monitor |
info | documentation | Shows Info documents, similar to man pages |
insmod | kernel modules | Loads a kernel module |
iostat | system administration | Shows system statistics about CPU and disk IO |
iotop | system monitoring | Monitors IO like the 'top' command |
ip | networking | Shows network configuration and information |
iperf | networking | Performs network testing using network sockets |
» J | ||
jobs | tasks | Shows available running tasks (jobs) |
join | data processing | Joins data from two files by using a common field |
journalctl | logging | Logging facility for Linux systems using systemd |
» K | ||
kill | processes | Sending signals to processes |
killall | processes | Kills processes by their name |
» L | ||
last | authentication | Shows who is logged in other other important events like system reboot |
lastlog | authentication | Shows the last time user were logged in |
ldd | binaries | Shows the shared libraries of a binary file |
less | data processing | Filter tool to scroll through files or output, similar to more |
ln | files | Links one file to another one |
lnstat | networking | Shows network statistics |
locate | files | Locate a file |
logger | logging | Create a message and send it to the system log facility |
login | authentication | Begin a new session |
logout | authentication | Close or exit from a session where you are logged in |
logrotate | logging | Archives older log files and creates a new one, optionally restart a related service |
ls | files | Shows files within a defined directory |
lsattr | filesystem | Shows file attributes |
lsblk | system information | Shows information about block devices such as hard disks |
lscpu | memory | CPU information, virtualization features, CPU vulnerabilities |
lsfd | files | Shows open file descriptors for processes |
lshw | system information | Shows hardware information |
lsipc | processes | Shows information about IPC (inter-process communication) resources |
lslocks | files | Shows file locks including OFD (Open File Description) locks |
lslogins | authentication | Shows list of users and last login |
lsmem | memory | Shows available memory range and online status of those ranges |
lsmod | kernel modules | Shows load kernel modules |
lsns | namespaces | Shows used namespaces |
lsof | files | Shows open files and sockets |
lsusb | capabilities | Show USB devices |
ltrace | processes | Tracks calls to libraries |
lvchange | storage | Changes attributes of a logical volume |
lvconvert | storage | Converts a logical volume type from linear to a mirror or snapshot |
lvcreate | storage | Create a logical volume in existing volume group |
lvdisplay | storage | Display information about a logical volume |
lvextend | storage | Increase the size of a logical volume |
lvmconfig | storage | Display the LVM configuration |
lvmdiskscan | storage | Scans and shows devices that are visible to LVM |
lvmdump | storage | Creates lvm2 information dumps for analysis |
lvreduce | storage | Reduces the size of a logical volume |
lvremove | storage | Removes a logical volume |
lvrename | storage | Renames a logical volume |
lvresize | storage | Resizes a logical volume |
lvs | storage | Reports information about logical volumes |
lvscan | storage | Scans disks for presence of logical volumes |
lynis | auditing | Performs a Linux security audit and configuration check |
» M | ||
man | documentation | Shows man page, usually documentation about a command or system function |
mkdir | directories | Creates a new directory |
mkfifo | files | Creates a named pipe of type FIFO (first in, first out) |
mknod | files | Creates block or character special files |
mkswap | memory | Creates Linux swap on a device or as a file |
mktemp | files | Creates a temporary directory |
mmv | files | Rename multiple files by wildcard pattern |
modinfo | kernel modules | Shows information about kernel modules |
modprobe | kernel modules | Loads or unloads a kernel module |
more | data processing | Filter tool to scroll through files or output |
mount | filesystem | Makes a filesystem available to the system for data storage |
mtr | networking | Performs network diagnostics |
mv | filesystem | Renames a file or directory |
» N | ||
nc | networking | Connects and listens to TCP and UDP connections |
ncal | date and time | Shows calendar |
netcap | capabilities | Display available capabilities for running processes using network sockets |
nft | networking | Administers nftables firewall |
nice | processes | Runs commands with specified priority |
niceload | processes | Slows down a program based on the system load, or disk IO, memory, or swap usage |
nl | data processing | Shows a file with line numbers |
nmap | networking | Performs network scanning tasks |
nslookup | networking | Performs lookup for DNS entries |
nstat | network | Network statistics and counters |
numactl | processes | Controls NUMA policy for processes and shared memory |
numastat | memory | Shows information about NUMA (Non-Uniform Memory Access) |
» O | ||
od | data processing | Shows files or text in octal and other formats |
on_ac_power | system state | Shows if system is on AC power or not |
openssl | cryptography | Provides toolkit with cryptography functions |
» P | ||
pacman | package management | Package manager |
passwd | authentication | Change password |
pax | archiving | Read and write file archives and copy directory hierarchies |
peekfd | processes | Tracks a process and show file descriptor activity |
perl | programming languages | Perl programming language |
pgrep | processes | Search processes by name |
pidof | processes | Returns process IDs for a process name |
pidstat | monitoring | Monitoring CPU, memory, and disk activity |
pidwait | processes | Wait for process to stop |
ping | networking | Tests if another system on the network is reachable |
pinky | authentication | Shows information about other users on the system, similar to finger command |
pkill | processes | Kills processes by their name |
pmap | processes | Shows memory mapping of process |
postconf | mail and messaging | Postfix configuration tool |
postqueue | mail and messaging | Performs tasks on the mail queue |
printf | data handling | Shows text on screen with formatting options |
prtstat | processes | Shows process details for selected process like state, CPU and memory usage |
ps | processes | Shows active processes |
pscap | capabilities | Display available capabilities for running processes |
pslog | logging | Shows which log files a process has opened |
pstree | processes | Show active processes and children like a tree |
pwck | authentication | Checks password file for errors |
pwd | shell | Shows the current directory |
pwdx | processes | Shows current working directory of a process |
pwscore | authentication | Checks password quality |
» R | ||
readlink | files | Determines if a file is a link to another file |
reboot | system management | Reboots the system |
rename | files | Rename multiple files |
renice | processes | Changes the priority of running processes |
reset | shell | Initializes the terminal, useful when it is acting strangely |
resolvectl | network | Name resolution information from resolve daemon |
rev | data | Shows text in reverse order |
rg | files | Performs recursive search for lines matching specified pattern |
rm | files | Removes a file or if defined a recursive directory structure |
rmdir | directories | Removes an empty directory |
rmmod | kernel modules | Unloads a kernel module |
route | networking | Show or changes the network route |
rpm | software | Queries and install RPM packages |
rpmbuild | software | Creates a RPM file from a .spec file |
rsync | system administration | Synchronizes two directories on local or with remote system |
run0 | privileged commands | Executes commands with additional privileges |
runcon | processes | Run a command within a different SELinux security context |
runlevel | system state | Show current runlevel |
» S | ||
scp | system administration | Copies a file using secure file copy |
screen | shell | Creates and controls multiple terminals from a single screen |
script | system administration | Stores executed commands and their output in a file |
sdiff | files | Shows a side-by-side comparison of files |
sed | data processing | Filtering and transforming text |
sensors | system resources | Reports about system sensors such as CPU temperature |
seq | data | Show a sequence of numbers |
setcap | capabilities | Add or remove Linux capabilities to a file |
setfacl | file permissions | Defines file access control lists |
sha1sum | files | Computes or compares a SHA1 message digest to check file integrity |
sha256sum | files | Computes or compares a SHA256 message digest to check file integrity |
sha512sum | files | Computes or compares a SHA512 message digest to check file integrity |
shasum | files | Computes or compares message digest to check file integrity |
shred | files | Overwrites content of file with optional file deletion |
shuf | data processing | Shuffles data, randomizing it |
shutdown | system management | Gives shutdown command to the system |
slabtop | memory | Shows slab usage of kernel |
sleep | automation | Performs a sleep where the command waits |
smem | memory | Show memory usage including swap |
socat | networking | Establishes connection between hosts for data transfers |
sort | data processing | Sorts data |
split | files | Splits a file into smaller files |
ss | sockets | Shows information about sockets |
ssh | system administration | Connects to a remote system |
ssh-add | system administration | Adds authentication keys to the OpenSSH agent |
ssh-agent | system administration | OpenSSH agent that holds authentication keys used for public key authentication |
ssh-copy-id | system administration | Copies SSH keys to a remote system |
ssh-keygen | system administration | Manages SSH keys including creation |
stat | files | Shows information about files |
strace | process inspection | Inspects running process |
strings | files | Shows text strings in a (binary) file |
su | authentication | Switches to another user |
sudo | authentication | Runs a command with more privileges |
sysctl | kernel | Show or set kernel settings |
systemctl | system management | Interfaces with systemd components |
systemd-analyze | performance | Performance and security analyzer of systemd components |
» T | ||
tac | data processing | Shows a file in reverse |
tail | data processing | Shows the last part of files, opposite of 'head' |
tar | archiving | Creates or unpacks file archives |
tcpdump | network sniffing | Monitors network traffic on specified interface |
tee | data processing | Shows file contents while also redirecting it to a file |
time | performance | Time how long it takes for a command to complete |
timedatectl | date and time | Shows information about clock sources and synchronization state |
timeout | processes | Runs a command with a defined time limit |
tload | system performance | Shows load of system in graphical representation |
tmux | shell | Creates and controls multiple terminals from a single screen |
top | processes | Shows and monitors running processes |
touch | files | Changes file timestamps |
tr | data processing | Translate or delete characters from a string |
tracepath | networking | Tracking path of packets for network diagnostics |
traceroute | networking | Performs network diagnostics by tracking path of packets |
tree | files | Show the contents of directories in a tree-like format |
true | shell | Exits with a "good" status code indicating success |
truncate | files | Decrease or increase the size of a file, useful for reserving space |
tshark | networking | Network traffic capturing and analysis |
» U | ||
umask | files | Set default file permissions |
umount | files | Disables a filesystem currently available to the system |
unalias | shell | Removes a defined alias |
uname | system information | Shows basic system information |
uniq | data processing | Take input data and make it unique |
units | data conversion | Converts a unit into another one, like from Celcius to Fahrenheit |
unshare | processes | Creates a new namespace and then runs specified command |
unzip | data processing | Uncompresses a ZIP archive |
uptime | system status | Shows uptime of system |
useradd | authentication | Creates a new user |
userdel | authentication | Deletes an existing user |
usermod | authentication | Modifies user account details |
users | authentication | Shows who is logged in |
uuidgen | data processing | Generates an universally unique identifier (UUID) |
» V | ||
vdir | file system | Shows contents of a directory |
vgremove | storage | Removes a volume group |
vgrename | storage | Renames a volume group |
vgs | storage | Reports information about volume groups |
vgscan | storage | Scans all disks for presence of volume groups |
vgsplit | storage | Splits a volume group |
vigr | authentication | Editor for group file |
vipw | authentication | Editor for password file |
vmstat | memory | Shows virtual memory information, disk IO, CPU activity |
» W | ||
w | authentication | Shows uptime, system load, who is logged in and what they have running |
watch | processes | Monitors changes in output of specified command |
wc | data processing | Count lines or characters of a file or standard input |
wget | HTTP client | Performs HTTP requests such as downloading files |
whatis | documentation | Shows small description of matched entries in man pages |
which | files | Locate a command or file |
whiptail | shell scripting | Displays a dialog box from within a shell script |
who | authentication | Shows who is logged in |
whoami | authentication | Shows your identity |
write | users | Writes a message to another user on the system |
» X | ||
xargs | data processing | Reads standard input and uses it to execute commands |
xattr | filesystem | Shows or sets extended attributes |
xxd | data processing | Shows hexdump from data or its reverse |
» Y | ||
yes | data processing | Say 'yes' to prompts |
» Z | ||
zcat | data processing | View gzipped files like 'cat' |
zstd | archiving | Fast lossless compression algorithm and data compression tool |
zypper | software | Install and remove packages, including querying information |