There are numerous Linux commands out there. There are a subset of built-in shell commands like cd and then there are the ones from GNU coreutils like less. In addition to that there are additional CLI utilities like curl, wget etc.
On Linux Handbook, we have covered over 80 Linux commands with practical examples. This is a collection of all the Linux commands we have covered so far.
The commands have been organized in alphabetical order so that it is easy for you to find the commands from the index.
A
alias
The alias command is simply a way to reference another command. It can be used to avoid repetitive long typing of commands and shell lines and simplify work.
at
The at command in Linux is used to schedule jobs that do not run on a regular schedule.
awk
The AWK command dates back to the early Unix days. Long back before Perl or Python came into existence, AWK was used in scripts for manipulating text. You can use it for writing relatively complex programs, but also because of the powerful one-liners you can write to solve issues with your data files.
B
basename
The basename command in Linux prints the final component in a file path. This is particularly helpful in bash scripts where you want to extract the file name from the long file path.
C
cal
Unix-like systems provide a handful of tools for dealing with dates and times. Cal is one such command that enables you to view calendar in the command line.
cat
cat is one of the most used commands in Linux. Intended for concatenating text, it is mainly used for displaying the contents of text files.
The chown command in Linux enables you to change the user and group ownership of a file or directory.
cp
One of the commands that you must know in Linux is cp. It’s often called the copy command in Linux and it is actually short for copy and it does exactly as it name suggests: it copies.
cron
The crontab is used to automate all types of tasks on Linux systems. This is an especially important skill for aspiring system administrators to learn.
curl
CURL is a tool for data transfer. The most popular use case for curl command is to download files from the web in Linux terminal.
cut
The cut command is the canonical tool to remove “columns” from a text file. In this context, a “column” can be defined as a range of characters or bytes identified by their physical position on the line, or a range of fields delimited by a separator.
D
date
The date command gives you the current date and time of you Linux system. But it can do a lot more than that.
dd
The dd command in Linux is a powerful utility for copying and converting files. Its most popular use case is creating live Linux USB using Linux command line.
df
The df command is used for checking disk space in Linux.
diff
When you need to compare two files containing similar text in Linux, using the diff command can make your task much easier. The command compares two files to suggest changes that would make the files identical. Great for finding that extra curly brace that broke your newly updated code.
dig
Dig command in Linux is commonly used for retrieving the DNS information of a remote server.
dirname
The dirname command in Linux prints a file path with its final component removed. This basically gives you the directory path from the file path.
du
Knowing the size of a file is easy in Linux but it won't show the size of directories. The du command is used for checking the size of directory.
E
echo
The echo command is perhaps one of the first few commands you see when you start learning Linux commands or bash shell scripting. It is a simple command that simply prints its arguments on the display.
emacs
There are many text-based editors in Linux. GNU Emacs is one of the oldest and powerful editor that has a steep learning curve.
expand
This is a rather less known and less used command with the main use case being the ability to convert tabs into spaces.
F
file
The file command gives you various information about a file in Linux. This includes the type of file, MIME type etc.
find
One of the frequent used commands. The find command can be used to looks for files based on their name, type, modification time and more. Combine it with the likes of exec or xargs command and you have a powerful tool at your hand for searching and modifying files.
findmnt
Another lesser know command which is used for checking if a file system is mounted.
fmt and fold
Both of these commands are used for formatting text so the lines will fit in the available space on the target device.
free
If you would like to know the detailed information about the memory availability on your Linux system, the free command is a simple utility that makes it easy to find real time results for a variety of use cases.
fsck
The fsck (file system check) command helps with a potentially corrupted filesystem. This utility is used for checking and (optionally) repairing the file system.
G
grep
Find command works on file name. The grep command is used to find patterns inside file content.
groupadd
The groupadd command in Linux creates new groups
groupdel
The groupdel command is perhaps the simplest command in Linux with virtually no options. It is used for deleting an existing group.
groupmod
You can modify group properties like group name and group ID with the groupmod command in Linux.
groups
This command helps you find the groups a Linux user belongs to in Linux command line.
H
head
You can use the head command to print a specified number of lines from the beginning of the file.
history
Everything you type in the terminal is stored in the shell history. This aspect can be displayed and controlled through the history command.
I
id
Every user in Linux has a unique, numeric user ID and a default group with a unique numeric group ID. The id command prints this information.
J
jobs
The jobs command in Linux allows the user to directly interact with processes in the current shell.
L
less
Less is an awesome Linux command utility for viewing text files.
The core functionality of Netcat is allowing two computers to connect and share resources. It is a powerful and versatile network tool that is available for Linux, Mac, and Windows machines.
nslookup is one of the popular networking commands in Linux used for querying the Domain Name System (DNS) records.
P
passwd
The passwd command in Linux allows you to change user password, lock accounts, expire passwords and more.
paste
The paste command merges several input files to produce a new delimited text file from them.
ping
Ping is mainly used to check if a remote host is reachable or not.
printf
You may print simple outputs with echo command but that's not enough for complicated formatted outputs. printf allows a C styled formating of the output.
ps
The ps command in Linux is used for getting information about running processes.
R
read
With read command, you can make your bash script interactive by accepting user inputs.
reboot
Reboot performs the actions of the halt command (explained below), requiring that all processing stop. Then instead of triggering the ACPI signal, your system is restarted.
The rm command is used for removing files and directories in Linux.
rsync
Rsync (Remote Sync) is a synchronization tool for copying files and directories in a system or between systems. Its most popular use case includes copying files between remote systems.
S
scp
Scp stands for secure copy but I like to think it as 'SSH copy'. Like rsync, scp is also used for copying files between remote systems.
screen
The screen command in Linux allows you to use multiple virtual terminals that can be saved by name and reopened using keyboard shortcuts.
sed
Sed is part of the Unix standard toolbox since the end of the 60s. As any text editor, it will help you to modify text files.
seq
The seq command, short for sequence, is used for printing a sequence of numbers. The numbers could be integers or real (with decimal points).
sleep
Linux sleep command is one of the simplest commands out there. As you can guess from the name, its only function is to sleep. In other words, it introduces a delay for a specified time.
source
The source command is a handy utility that can be used to refresh environment variables among some other things.
stat
You can get file permissions, size, mtime, ctime, atime, ownership and several other file attribute information using the stat command in Linux.
T
tail
The tail command prints the last ten lines of the input files. The tail command is also used for reading log files in real time.
tar
Tar is one of the most common tool used for archiving files in Linux.
tee
The tee command reads from the standard input and writes to both standard output and files. The result is that you get to see your command’s output as well as save it to a file at the same time.
With the timeout command you can set a time limit on running other commands and programs.
top
The top command provides a quick look at system resources and processes.
touch
Touch command in Linux is used for changing file timestamps however one of the most common usages of touch command includes creating a new empty file.
tr
The tr command in Linux is used to perform simple but useful translations of one set of characters into another.
type
The type command tells you whether a Linux command is built-in shell command, where is its executable located and whether it is aliased to some other command.
U
ulimit
Ulimit is a built-in shell command designed to display, allocate, and limit resources.
uname
You can get Linux kernel version and some other system information with the uname command in Linux.
uniq
The uniq command in Linux and Unix is used for removing duplicate lines from a file.
useradd
The useradd command lets a superuser create a new user account on Linux.
userdel
The userdel lets you delete an existing user.
usermod
The usermod command in Linux allows you to modify a user account in various ways.
V
vim
Vim is one of the most popular text editor in the Linux command line.
W
watch
Watch is a great utility that automatically refreshes data. Some of the more common uses for this command involve monitoring system processes or logs, but it can be used in combination with pipes for more versatility.
wc
The wc command displays statistical information about a file such as the number of lines, words, characters.
which
which command is an extremely useful command for locating executable files located anywhere in the Linux system.
who
The who command in Linux lists all logged-in users on the system.
This is all for the moment. I'll add more commands as they get featured here.
Creator of Linux Handbook and It's FOSS. An ardent Linux user & open source promoter. Huge fan of classic detective mysteries from Agatha Christie and Sherlock Holmes to Columbo & Ellery Queen.