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.
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.
The at command in Linux is used to schedule jobs that do not run on a regular schedule.
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.
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.
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 is one of the most used commands in Linux. Intended for concatenating text, it is mainly used for displaying the contents of text files.
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.
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 is a tool for data transfer. The most popular use case for curl command is to download files from the web in Linux terminal.
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.
The date command gives you the current date and time of you Linux system. But it can do a lot more than that.
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.
The df command is used for checking disk space in Linux.
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.
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.
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.
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.
There are many text-based editors in Linux. GNU Emacs is one of the oldest and powerful editor that has a steep learning curve.
This is a rather less known and less used command with the main use case being the ability to convert tabs into spaces.
The file command gives you various information about a file in Linux. This includes the type of file, MIME type etc.
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.
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.
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.
The fsck (file system check) command helps with a potentially corrupted filesystem. This utility is used for checking and (optionally) repairing the file system.
Find command works on file name. The grep command is used to find patterns inside file content.
The groupadd command in Linux creates new groups
The groupdel command is perhaps the simplest command in Linux with virtually no options. It is used for deleting an existing group.
You can modify group properties like group name and group ID with the groupmod command in Linux.
This command helps you find the groups a Linux user belongs to in Linux command line.
You can use the head command to print a specified number of lines from the beginning of the file.
Everything you type in the terminal is stored in the shell history. This aspect can be displayed and controlled through the history command.
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.
With the timeout command you can set a time limit on running other commands and programs.
The top command provides a quick look at system resources and processes.
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.
The tr command in Linux is used to perform simple but useful translations of one set of characters into another.
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.
Ulimit is a built-in shell command designed to display, allocate, and limit resources.
You can get Linux kernel version and some other system information with the uname command in Linux.
The uniq command in Linux and Unix is used for removing duplicate lines from a file.
The useradd command lets a superuser create a new user account on Linux.
The userdel lets you delete an existing user.
The usermod command in Linux allows you to modify a user account in various ways.
Vim is one of the most popular text editor in the Linux command line.
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.
The wc command displays statistical information about a file such as the number of lines, words, characters.
which command is an extremely useful command for locating executable files located anywhere in the Linux system.
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.