Important Linux commands
All the tools you need as a server admin
It is difficult to compile a definitive list of the most important commands on Linux, as the importance of different commands can vary depending on the specific needs and tasks of the user.
Let's try it anyway! Here is our all-time favorite list of commonly used and important commands on Linux systems, that you should definitely know:
bash
- widely used Unix shellcat
- concatenate and display filescd
- change the current directorycp
- copy files and directoriesdf
- display information about free disk spacedu
- display the size of a file or directoryecho
- display a message or the value of a variablekill
- send a signal to a processless
- view the contents of a file one page at a timels
- list the contents of a directoryman
- display the manual page for a commandmc
- start the Midnight Commandermkdir
- create a new directorymv
- move or rename files and directoriesping
- send a network test packetps
- display information about running processespwd
- print the current working directoryrm
- delete files and directoriesrsync
- synchronize files between two systemsscreen
- run multiple "tabs" in one terminal sessionssh
- connect to a remote host using the Secure Shell (SSH) protocolsudo
- execute a command as roottail
- display the last few lines of a filetop
- display the top running processes
Here at CleverUptime, we are using all of those commands on a daily basis. They make our life easier and everybody knows them by heart.
If you read this far, you probably know already all the commands above and you're interested to learn about other commands that can help you as an admin.
Great! Here is the extended list:
ab
- a tool for benchmarking web serversalias
- create a shortcut for a commandapt
- install, remove, and manage software packagesapt-cache
- search for and display information about software packagesapt-get
- install, remove, and manage software packagesaria2c
- download files using different protocolsat
- execute a command at a specified timeatop
- show performance metricsawk
- perform text processing and data manipulation tasksblkid
- identify and manage filesystem labels and UUIDsbtrfs
- manage the btrfs file systemcertbot
- manage SSL/TLS certificates from Let's Encryptchgrp
- change the group ownership of a file or directorychmod
- change the permissions of a file or directorychown
- change the owner of a file or directorycomm
- compare two sorted files line by linecrontab
- schedule a command to be executed at a specified timecryptsetup
- encrypt block devicescurl
- transfer data to or from a servercut
- extract fields or columns from a filedate
- display the current date and timedd
- copy data between block devicesdd_rescue
- rescue data from block devicesdiff
- compare two files and display the differencesdig
- query the domain name systemdmesg
- view the kernel's message bufferdnf
- install, remove, and manage software packages on Fedora-based systemsdocker
- manage software running in containersdosfsck
- check and repair FAT file systemsdpkg
- install, remove, and manage Debian package filese2fsck
- check and repair ext file systemsemacs
- edit text files with the Emacs editoremerge
- install, remove, and manage software packages on Gentoo-based systemsexport
- set the value of an environment variablefdisk
- manage partitions on hard drives and SSDsfdupes
- find and manage duplicate filesffmpeg
- manipulate multimedia filesfind
- search for files and directoriesfold
- adjust the width of outputfree
- display information about free and used memoryfsck
- check and repair a file systemgcc
- compile C filesgdisk
- guided partition table manipulationgetent
- get information from administrative databasesgit
- a version control systemgrep
- search for a pattern of text within a filegroupdel
- delete a groupgroupmod
- modify a groupgunzip
- decompress filesgzip
- compress or decompress fileshalt
- shut down the systemhead
- display the first few lines of a filehost
- query DNS servershostname
- display the hostname of the systemhtop
- display performance metricsifconfig
- display information about network interfacesinit
- change the runleveliostat
- display information about the current I/O performanceiotop
- display performance metrics for I/Oip
- display and configure network interfacesiptables
- configure the kernel's firewalljoin
- join lines of two files on a common fieldjournalctl
- display logging informationlast
- display users who logged in lastln
- manage hard and soft linkslocate
- search for files and directories using a databaselogrotate
- organize log fileslp
- send files to the printerlsb_release
- display information about your Linux distributionlsblk
- list block deviceslsmod
- list loaded kernel moduleslsof
- list open fileslspci
- list PCI deviceslvcreate
- create logical volumeslvremove
- delete logical volumeslynx
- browse the Web in a terminal windowmailq
- manage the mail queuemd5sum
- calculate the MD5 checksummdadm
- manage RAID devicesmemtest86
- test the RAMmkfs.btrfs
- format a device with btrfsmkfs.ext4
- format a device with ext4mkfs.vfat
- format a device with FATmkfs.xfs
- format a device with XFSmkswap
- create swap spacemodprobe
- add or remove kernel modulesmore
- view the contents of a file one page at a timemount
- make file systems accessible in the directory treemutt
- manage emailsmysqldump
- create backups of your MySQL databasenano
- edit text files with the Nano editornc
- send data over the networknetconfig
- configure network interfacesnetstat
- display network statisticsnft
- configure the kernel's firewallnice
- run a command with a modified scheduling prioritynmap
- scan for open ports and servicesnslookup
- query DNS serversntpq
- query NTP serversopenssl
- manage SSL certificatespacman
- install, remove, and manage software packages on Arch Linux-based systemspartprobe
- re-read the partition tablepasswd
- set user passwordspaste
- combine lines of filespatch
- apply a diff file to an original filepdftk
- manipulate PDF filespkgtool
- the Slackware package managerprintenv
- display the value of an environment variablepv
- monitor the progress of a pipepvcreate
- create a physical volumepwd
- print the current working directorypython
- run Python scriptsqemu-img
- manage virtual machine imagesrclone
- the swiss army knife for cloud storagereadlink
- display information about hard and soft linksreboot
- restart the systemrenice
- alter the priority of a running processrmdir
- delete an empty directoryrmmod
- remove Kernel modulesroute
- modify the IP routing tablersnapshot
- create file system backupssar
- monitor performance metricsscp
- copy files to or from a remote host using the Secure Copy (SCP) protocolsed
- perform text manipulation and substitution taskssendmail
- send emailssftp
- transfer files to or from a remote host using the Secure File Transfer Protocol (SFTP)sh
- launch the Bourne shellshutdown
- turn off or reboot the systemsleep
- do nothing for a specified timesmartctl
- show health and performance data of disk drivessnmpwalk
- a tool for network managementsort
- sort the lines of a filess
- show information about network connectionsssh-keygen
- generate keys for SSHssh-copy-id
- add SSH keys to a remote serversu
- become the superusersysctl
- a tool for fine-tuning your systemsystemctl
- manage servicestac
- display files in reversed ordertar
- create and extract archive filestcpdump
- capture network packagestee
- chaining together standard input and outputtelnet
- connect to a remote host using the Telnet protocoltimeout
- run a command with a time limittmux
- run multiple "tabs" in one terminal sessiontouch
- create a new file or update the modification time of an existing filetr
- modify standard outputtraceroute
- display the network path to a hostumount
- remove file systems from the directory treeuname
- display information about the systemuniq
- remove duplicate lines from a fileunset
- unset the value of an environment variableunzip
- extract files from a ZIP archiveupdate-alternatives
- configure default programs for your systemuptime
- display the current uptime of the systemusermod
- modify usersvi
- edit text files with the vi editorvirt-install
- create virtual machinesvirt-manager
- manage virtual machinesvmstat
- display performance statisticswatch
- run a program in regular intervalswc
- count the number of lines, words, and characters in a filewget
- download files from the Webwhereis
- display the location of a command, file, or manual pagewhich
- display the path of a commandwho
- display a list of users which are currently logged inxargs
- transform text into commandsxfs_repair
- repair XFS file systemsxz
- compress or decompress filesyast
- configure a SUSE based systemyum
- install, remove, and manage software packages on Red Hat-based systemszip
- compress files into a ZIP archivezstd
- compress or decompress fileszypper
- install, remove, and manage software packages on openSUSE-based systems
This is just a small selection of the many commands that are available on Linux systems. There are many other important and useful commands that may be specific to certain applications, programming languages, or tasks, and it is always a good idea to familiarize yourself with the commands that are relevant to your work.