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

Most common Linux commands for system administration (total of 329 tools)
CommandCategoryDescription
» A
absystem benchmarkingPerforms HTTP benchmarking and stress testing
addgroupauthenticationCreate new group
adduserauthenticationCreates a new user
aliasshellDefine an alias for another command
aproposdocumentationFind related man pages
aptpackage managementPackage manager
apt-filepackage managementSearch tool for files belonging to packages
archsystem informationShows machine hardware name
arpnetworkingShow or manipulate ARP entries
arpingnetworkingSends a ARP REQUEST to a specified host
arptablesnetworkingManages ARP table of system
auditctlauditingSet and control audit rules within the Linux Audit Framework
aureportauditingShow statistics about events created by the Linux Audit Framework
ausearchauditingSearch in events created by the Linux Audit Framework
awkdata processingPerforms data extraction and reporting from files
» B
badblocksstorageTests a device for bad blocks
base64data processingEncodes data to base64 or decodes back to its original form
basenamefilesStrips directory and file name suffix from a given path
basencdata processingEncodes and decodes data (e.g. using base64)
bcdata processingCalculator for numeric expressions and operations
bgtasksPut a task (job) to the background
blkdiscardstoragediscards specified device sectors on solid-state drives (SSDs) and thinly-provisioned storage
blkidstorageShows block device information
blkzonestorageRuns zone command on device, requires support for Zoned Block Commands (ZBC) or Zoned-device ATA Commands (ZAC)
blockdevstorageAllows using block device ioctls to get or set specific settings and values
bootctlboot loaderManages the EFI firmware boot settings for the boot loader
bridgenetworkingShows or configures information of network interfaces related to bridge addresses
btopsystem resourcesMonitors resources such as processor, memory, disks, network, and processes
busctlmessage busConnects to D-Bus to query information
bwrapsandboxingSandboxing tool
» C
caldate and timeShows calendar
capshcapabilitiesLinux capabilities testing and debugging tool
captestcapabilitiesCapabilities and privilege escalation testing tool
catdata processingShows contents of files
chaclfile permissionsChanges the access control list (ACL) of a file or directory
chattrfilesChanges file attributes
chfnauthenticationChanges user information
chmemmemoryConfigures memory and allows to set it online or offline
chmodfile permissionsSets file permissions
choommemoryShow or configure the out-of-memory killer score
chownfile permissionsSets file ownership
chrtprocessesSets Linux scheduler policy and priority for a process or command
clearshellClear the terminal
columndata processingFormats output into neatly organized tables/columns
commandcommandsLooks for the presence of a command by specified name
coredumpctlprocessesLists and processes stored core dumps
cpfilesCopy a file or if defined a recursive directory structure
csplitfilesSplit a file into multiple sections
curlHTTP clientPerforms HTTP requests
cutdata processingRemoves part of lines from a file
» D
datedate and timeShows or sets system date and time
dddata processingConverts and copies file data
devlinkdevicesShow or adjust device information and resources that are available via devlink API
dfstorageShows used and free disk space
diffdata processingCompares two files
diff3data processingCompares three files
digDNSPerforms DNS requests
dirfile systemShows contents of a directory
dirnamedata processingStrips last part of a path to return the directory name
dmesgloggingShows kernel log messages
dmidecodehardwareShows hardware information
dmstatsfile systemShows statistics for devices managed by device-mapper
dnfsoftwareInstall and remove packages, including querying information
dnscapnetworkingPerforms capture of DNS traffic
dnsdomainnamenetworkingShows the configured domain name
dnstopnetworkingShows DNS traffic on the network
dpkgsoftwareInstall and remove packages, including querying information
dufile systemShows disk size usage for paths
» E
e4cryptfile systemPerforms encryption management for ext4 file systems
ebtablesnetworkingManages ebtables (Ethernet Bridge tables), transparent network-traffic filtering
echodata handlingShows text on screen
ejectstorageEjects removable storage such as a USB disk
envprocessesRun a command in a different environment
expiryauthenticationChecks and enforces the defined password expiration policy
exprdata processingEvaluates expressions (e.g. A > B)
» F
fallocatefilesReserve file space for a specified file instead of filling it with zeroes
falseshellExits with a "bad" status code indicating success
fdiskstorageMakes changes to disk partition table
fgtasksReturns a task (job) from the background back to foreground and making it active
filefilesShows the file type of a specified file
filecapcapabilitiesDisplay of Linux capabilities set on binaries in paths
findfile systemSearches specified paths or its meta-data
fingerauthenticationShows information about other users on the system
firejailsandboxingSandboxing tool for Linux
freememoryShows used and free memory
fsadmstorageResizes a filesystem on a device
fsckfilesystemCheck a filesystem for consistency
fstrimstorageDiscards blocks (trim) that are no longer in use by the filesystem and is typically used for SSD drives and thinly-provisioned storage
fuserfiles and socketsShow processes using a file or socket
» G
getcapcapabilitiesShow file capabilities
getconfsystem informationShows values of system variables with miscellaneous kinds of information
getentauthenticationRetrieves entries from NSS (Name Service Switch) libraries
getfaclfile permissionsShows file access control lists
getfattrfilesystemShows extended attributes
getpcapscapabilitiesShow process capabilities
groupaddauthenticationCreates a new group
groupdelauthenticationDeletes an existing group
groupmemsauthenticationAllows users to do management for their primary group (unless having superuser permissions)
groupmodauthenticationModifies an existing group
groupsauthenticationShows the groups where the specified user is a member
grub-installboot loaderInstalls GRUB boot loader on the specified device
» H
hdparmstorageGet or set device parameters for IDE and SATA devices
headdata processingShow the first number of lines from a file
historyshellShows shell history of executed commands
hostnetworkingPerforms DNS lookup
hostidsystem informationShows host identifier of system
hostnamesystem informationShows or sets hostname of system
hostnamectlsystem informationShows basic information about the system
» I
idauthenticationShows your real and effective user and group IDs
ifconfignetworkingConfigures a network interface
iftopnetworkBandwidth usage monitor
infodocumentationShows Info documents, similar to man pages
insmodkernel modulesLoads a kernel module
iostatsystem administrationShows system statistics about CPU and disk IO
iotopsystem monitoringMonitors IO like the 'top' command
ipnetworkingShows network configuration and information
iperfnetworkingPerforms network testing using network sockets
» J
jobstasksShows available running tasks (jobs)
joindata processingJoins data from two files by using a common field
journalctlloggingLogging facility for Linux systems using systemd
» K
killprocessesSending signals to processes
killallprocessesKills processes by their name
» L
lastauthenticationShows who is logged in other other important events like system reboot
lastlogauthenticationShows the last time user were logged in
lddbinariesShows the shared libraries of a binary file
lessdata processingFilter tool to scroll through files or output, similar to more
lnfilesLinks one file to another one
lnstatnetworkingShows network statistics
locatefilesLocate a file
loggerloggingCreate a message and send it to the system log facility
loginauthenticationBegin a new session
logoutauthenticationClose or exit from a session where you are logged in
logrotateloggingArchives older log files and creates a new one, optionally restart a related service
lsfilesShows files within a defined directory
lsattrfilesystemShows file attributes
lsblksystem informationShows information about block devices such as hard disks
lscpumemoryCPU information, virtualization features, CPU vulnerabilities
lsfdfilesShows open file descriptors for processes
lshwsystem informationShows hardware information
lsipcprocessesShows information about IPC (inter-process communication) resources
lslocksfilesShows file locks including OFD (Open File Description) locks
lsloginsauthenticationShows list of users and last login
lsmemmemoryShows available memory range and online status of those ranges
lsmodkernel modulesShows load kernel modules
lsnsnamespacesShows used namespaces
lsoffilesShows open files and sockets
lsusbcapabilitiesShow USB devices
ltraceprocessesTracks calls to libraries
lvchangestorageChanges attributes of a logical volume
lvconvertstorageConverts a logical volume type from linear to a mirror or snapshot
lvcreatestorageCreate a logical volume in existing volume group
lvdisplaystorageDisplay information about a logical volume
lvextendstorageIncrease the size of a logical volume
lvmconfigstorageDisplay the LVM configuration
lvmdiskscanstorageScans and shows devices that are visible to LVM
lvmdumpstorageCreates lvm2 information dumps for analysis
lvreducestorageReduces the size of a logical volume
lvremovestorageRemoves a logical volume
lvrenamestorageRenames a logical volume
lvresizestorageResizes a logical volume
lvsstorageReports information about logical volumes
lvscanstorageScans disks for presence of logical volumes
lynisauditingPerforms a Linux security audit and configuration check
» M
mandocumentationShows man page, usually documentation about a command or system function
mkdirdirectoriesCreates a new directory
mkfifofilesCreates a named pipe of type FIFO (first in, first out)
mknodfilesCreates block or character special files
mkswapmemoryCreates Linux swap on a device or as a file
mktempfilesCreates a temporary directory
mmvfilesRename multiple files by wildcard pattern
modinfokernel modulesShows information about kernel modules
modprobekernel modulesLoads or unloads a kernel module
moredata processingFilter tool to scroll through files or output
mountfilesystemMakes a filesystem available to the system for data storage
mtrnetworkingPerforms network diagnostics
mvfilesystemRenames a file or directory
» N
ncnetworkingConnects and listens to TCP and UDP connections
ncaldate and timeShows calendar
netcapcapabilitiesDisplay available capabilities for running processes using network sockets
nftnetworkingAdministers nftables firewall
niceprocessesRuns commands with specified priority
niceloadprocessesSlows down a program based on the system load, or disk IO, memory, or swap usage
nldata processingShows a file with line numbers
nmapnetworkingPerforms network scanning tasks
nslookupnetworkingPerforms lookup for DNS entries
nstatnetworkNetwork statistics and counters
numactlprocessesControls NUMA policy for processes and shared memory
numastatmemoryShows information about NUMA (Non-Uniform Memory Access)
» O
oddata processingShows files or text in octal and other formats
on_ac_powersystem stateShows if system is on AC power or not
opensslcryptographyProvides toolkit with cryptography functions
» P
pacmanpackage managementPackage manager
passwdauthenticationChange password
paxarchivingRead and write file archives and copy directory hierarchies
peekfdprocessesTracks a process and show file descriptor activity
perlprogramming languagesPerl programming language
pgrepprocessesSearch processes by name
pidofprocessesReturns process IDs for a process name
pidstatmonitoringMonitoring CPU, memory, and disk activity
pidwaitprocessesWait for process to stop
pingnetworkingTests if another system on the network is reachable
pinkyauthenticationShows information about other users on the system, similar to finger command
pkillprocessesKills processes by their name
pmapprocessesShows memory mapping of process
postconfmail and messagingPostfix configuration tool
postqueuemail and messagingPerforms tasks on the mail queue
printfdata handlingShows text on screen with formatting options
prtstatprocessesShows process details for selected process like state, CPU and memory usage
psprocessesShows active processes
pscapcapabilitiesDisplay available capabilities for running processes
pslogloggingShows which log files a process has opened
pstreeprocessesShow active processes and children like a tree
pwckauthenticationChecks password file for errors
pwdshellShows the current directory
pwdxprocessesShows current working directory of a process
pwscoreauthenticationChecks password quality
» R
readlinkfilesDetermines if a file is a link to another file
rebootsystem managementReboots the system
renamefilesRename multiple files
reniceprocessesChanges the priority of running processes
resetshellInitializes the terminal, useful when it is acting strangely
resolvectlnetworkName resolution information from resolve daemon
revdataShows text in reverse order
rgfilesPerforms recursive search for lines matching specified pattern
rmfilesRemoves a file or if defined a recursive directory structure
rmdirdirectoriesRemoves an empty directory
rmmodkernel modulesUnloads a kernel module
routenetworkingShow or changes the network route
rpmsoftwareQueries and install RPM packages
rpmbuildsoftwareCreates a RPM file from a .spec file
rsyncsystem administrationSynchronizes two directories on local or with remote system
run0privileged commandsExecutes commands with additional privileges
runconprocessesRun a command within a different SELinux security context
runlevelsystem stateShow current runlevel
» S
scpsystem administrationCopies a file using secure file copy
screenshellCreates and controls multiple terminals from a single screen
scriptsystem administrationStores executed commands and their output in a file
sdifffilesShows a side-by-side comparison of files
seddata processingFiltering and transforming text
sensorssystem resourcesReports about system sensors such as CPU temperature
seqdataShow a sequence of numbers
setcapcapabilitiesAdd or remove Linux capabilities to a file
setfaclfile permissionsDefines file access control lists
sha1sumfilesComputes or compares a SHA1 message digest to check file integrity
sha256sumfilesComputes or compares a SHA256 message digest to check file integrity
sha512sumfilesComputes or compares a SHA512 message digest to check file integrity
shasumfilesComputes or compares message digest to check file integrity
shredfilesOverwrites content of file with optional file deletion
shufdata processingShuffles data, randomizing it
shutdownsystem managementGives shutdown command to the system
slabtopmemoryShows slab usage of kernel
sleepautomationPerforms a sleep where the command waits
smemmemoryShow memory usage including swap
socatnetworkingEstablishes connection between hosts for data transfers
sortdata processingSorts data
splitfilesSplits a file into smaller files
sssocketsShows information about sockets
sshsystem administrationConnects to a remote system
ssh-addsystem administrationAdds authentication keys to the OpenSSH agent
ssh-agentsystem administrationOpenSSH agent that holds authentication keys used for public key authentication
ssh-copy-idsystem administrationCopies SSH keys to a remote system
ssh-keygensystem administrationManages SSH keys including creation
statfilesShows information about files
straceprocess inspectionInspects running process
stringsfilesShows text strings in a (binary) file
suauthenticationSwitches to another user
sudoauthenticationRuns a command with more privileges
sysctlkernelShow or set kernel settings
systemctlsystem managementInterfaces with systemd components
systemd-analyzeperformancePerformance and security analyzer of systemd components
» T
tacdata processingShows a file in reverse
taildata processingShows the last part of files, opposite of 'head'
tararchivingCreates or unpacks file archives
tcpdumpnetwork sniffingMonitors network traffic on specified interface
teedata processingShows file contents while also redirecting it to a file
timeperformanceTime how long it takes for a command to complete
timedatectldate and timeShows information about clock sources and synchronization state
timeoutprocessesRuns a command with a defined time limit
tloadsystem performanceShows load of system in graphical representation
tmuxshellCreates and controls multiple terminals from a single screen
topprocessesShows and monitors running processes
touchfilesChanges file timestamps
trdata processingTranslate or delete characters from a string
tracepathnetworkingTracking path of packets for network diagnostics
traceroutenetworkingPerforms network diagnostics by tracking path of packets
treefilesShow the contents of directories in a tree-like format
trueshellExits with a "good" status code indicating success
truncatefilesDecrease or increase the size of a file, useful for reserving space
tsharknetworkingNetwork traffic capturing and analysis
» U
umaskfilesSet default file permissions
umountfilesDisables a filesystem currently available to the system
unaliasshellRemoves a defined alias
unamesystem informationShows basic system information
uniqdata processingTake input data and make it unique
unitsdata conversionConverts a unit into another one, like from Celcius to Fahrenheit
unshareprocessesCreates a new namespace and then runs specified command
unzipdata processingUncompresses a ZIP archive
uptimesystem statusShows uptime of system
useraddauthenticationCreates a new user
userdelauthenticationDeletes an existing user
usermodauthenticationModifies user account details
usersauthenticationShows who is logged in
uuidgendata processingGenerates an universally unique identifier (UUID)
» V
vdirfile systemShows contents of a directory
vgremovestorageRemoves a volume group
vgrenamestorageRenames a volume group
vgsstorageReports information about volume groups
vgscanstorageScans all disks for presence of volume groups
vgsplitstorageSplits a volume group
vigrauthenticationEditor for group file
vipwauthenticationEditor for password file
vmstatmemoryShows virtual memory information, disk IO, CPU activity
» W
wauthenticationShows uptime, system load, who is logged in and what they have running
watchprocessesMonitors changes in output of specified command
wcdata processingCount lines or characters of a file or standard input
wgetHTTP clientPerforms HTTP requests such as downloading files
whatisdocumentationShows small description of matched entries in man pages
whichfilesLocate a command or file
whiptailshell scriptingDisplays a dialog box from within a shell script
whoauthenticationShows who is logged in
whoamiauthenticationShows your identity
writeusersWrites a message to another user on the system
» X
xargsdata processingReads standard input and uses it to execute commands
xattrfilesystemShows or sets extended attributes
xxddata processingShows hexdump from data or its reverse
» Y
yesdata processingSay 'yes' to prompts
» Z
zcatdata processingView gzipped files like 'cat'
zstdarchivingFast lossless compression algorithm and data compression tool
zyppersoftwareInstall and remove packages, including querying information