Do you know how many commands does Linux have altogether? Infinitely many. And to be precise, it has as many commands as you want to dig out, and as few, as you really need. So what’s the secret way to memorize all of them?
Well, I’d say you can’t do that, and perhaps nobody ever does. Moreover, there is no point in mastering all terminal tools and commands – you could save your time for other important things.
But if your ultimate goal is to understand Linux well, this is your place. Here in this article, we have potentially narrowed down some of the mostly used linux commands by categories to make your goal easy-peasy of understanding Linux better.
Whether you are just starting out or have made some progress into the field; below is the small subset of basic linux commands for beginners.
50 Most Common Linux Commands for Beginners
We’ve also provided the description for each command that basically includes the use of it and other important stuff associated.
Learning Linux navigation commands and getting aware of what’s around is the most fundamental core skill you should master before jumping-off to further exploration. Practicing File management commands in linux is the bare minimum to get started with this fantastic Unix-like operating system.
1. pwd
pwd stands for “Print Work directory,” and this command helps you to locate which home directory you’re currently in and ensure that you won’t get lost or overwhelmed in a terminal window. A home directory is used by a user to store and create directories, which are basically the location in the filesystem.
2. Is
By using Is command, you can display the contents (files and folders) of the current or any particular directory. Not to mention, it’s also one of the frequently used commands in the Unix world.
3. cd
This command helps you to move around from one directory to another and browse the entire filesystem without hitting a snag.
4. mkdir
To create a new folder through the terminal, you will be required to employ the mkdir command.
5. Isblk
This command displays the list of all the information related to all the block devices.
6. mount
It’s used to mount the filesystem found on a device to the big tree structure rooted at ‘/‘
7. rmdir
For deleting any empty directories from the system, you can use the rmdir command. We hope you don’t get confused with mkdir and rmdir.
8. df
Used for displaying the essential information about the total space and available space on the filesystem. For system administrators, it’s an important command on their arsenal to monitor and analyze real-time server as well.
9. rm
Used to delete objects like file/ folders, directories, symbolic links, etc. from the filesystem.
10. cp
It is used to copy files, groups of files or directory from one folder to another right from the terminal.
11. mv
Used to move single or multiple files or directories from one location to another in the file system.
12. cat
This command is used to create, view, and concatenate multiple files. It works in a way by reading the data from a file and giving its content as an output.
13. tail
Yet another basic Linux command which is commonly used for outputting the last part of files given to it via standard input. By default, this command prints the last N number of data of the given input.
14. touch
The touch command-line is an important utility for creating a valid empty file in the terminal that you can either fill later or in real-time. You can use it to create, change, and modify timestamps of a file in a go.
15. comm
comm command is mainly used for comparing two sorted files line by line on the terminal for the common and distinct lines. It can be really helpful when you’re trying to process large amounts of files and data.
16. less
It can be used for reading or viewing the contents of a text file without having to interrupt the ongoing terminal session.
17. In
The In command is used for creating symbolic links between any specific file.
18. dd
This command-line utility is used for copying and converting files from one type to another.
19. cmp
If you want to compare two files byte by byte, the cmp command will help you do that. It helps to find out whether or not two files are identical and print the result to the standard output stream.
20. alias
alias command instructs the shell to replace a word by another string in files directly from the terminal while executing the commands.
Most Common Linux Commands for Manipulation of the System
The various system commands let you dig out the essential information about your Linux system and make you more familiarize.
21. ps
It’s one of the handiest commands to display the list of the currently running processes and PIDs by your machine.
22. service
It’s a de-facto command that can be leveraged for running a System V init script.
23. kill
The kill command functions the same way as it sounds. It’s used for manually terminating the processes (without having to log-out or reboot the system) that sometimes get stuck due to resource constraints.
24. uname
uname is used for gaining the system information (name, version, and other system-specific details) about the current machine and the operating system running on it.
25. batch
batch command is used for running system services in a pre-defined schedule. For instance, it’s used for reading commands from standard input or a specified file and carry out them when system load levels permit.
26. shutdown
As the very name implies, the shutdown command immediately brings the machine down in the safest way.
Commonly used Linux Commands for Network Administration
Since networking is an essential part of servers, learning how to diagnose network issues is vital. With this list of Linux Network commands, we have a few in-built commands you can use in your profit when you want to troubleshoot.
27. iptables
It’s a command-line interface used for setting up and maintain tables for the Netfilter firewall for IPv4. With the help of iptables, system admins can control and monitor the incoming and outgoing internet traffic for a particular host machine.
28. wget
wget is a GNU command-line utility that is used by network admins to download files from the web without hindering the current process. Moreover, it’s non-interactive, which means it works in the background; thus, it can be used in scripts and cronjobs.
29. cURL
It’s a powerful tool that helps users in transferring data to or from a network server. The network tool, cURL is designed to work even without any user interaction; therefore, it can ideally be used in a shell script.
30. traceroute
This command is highly used by security professionals to comprehend the route that a packet takes to reach the host from one machine to another.
Most Useful Linux Commands for Search Operations
There are a few useful commands Linux has, which effectively helps in searching data and matching complex patterns for a particular file or sequence in files.
31. cURL
find command helps users when searching for files and directories from the terminal to perform subsequent operations on them. It has various parameters that allow users to search file by folder, name, creation date, modification date, ownership, and file permissions.
32. which
This command comes quite handy if you are trying to search or locate the executable file associated with the given command. It takes specific criteria and searches for the binary files in the $PATH system environment variable.
33. locate
As the very name implies, locate command is used for finding the location of a specific file by its filename. When you find yourself in doubt, implement this command to locate any particular file on your Linux machine; it’s lightening-fast.
34. grate
Yet another powerful command you can employ when searching an object or file by a specific pattern of characters inside large volumes of text files. As soon as you enter the command, it will display all lines that contain the searched pattern.
35. sed
Using sed command, you can find, filter, replace, substitute, or even manipulate text like insertion, deletion, etc.
Linux I/O Commands and File/ Directory Commands
Knowing how to manage Linux’s input source or output destination and file or directory ownership is always helpful.
36. clear
clear command is used for wiping out your existing terminal screen.
37. sort
In Linux, with the help of sort command, it’s a breeze to sort out a file in an alphabetical or reverse manner and to arrange the records in a particular order.
38. echo
It’s used for displaying or outputting a specific text/string that is passed as an argument to the terminal console.
39. sudo
sudo stands for “superuser do” that lets non-privileged users (with proper permissions) to execute commands or access and modify files that require low-level permissions.
40. chmod
This command comes into rescue when a user wants to change or modify the access mode/permission of system or objects files.
41. chown
Quite similar in the operation to the aforementioned command, chown lets you change the ownership of a file or group. But make sure that both chmod and chown terminal commands necessarily require root privileges to run.
Some Miscellaneous Linux Commands
Let’s talk about some everyday use commands that would help you enhance your productivity, or you may use them for fun purposes when getting bored.
42. cal
Have you ever try to access the calendar in the Linux terminal? cal command is used to see the calendar of a specific month or a whole year in an ASCII text format.
43. fortune
The fortune command-line utility is a simple program based on the fortune-mod package that displays random poignant, inspirational, sarcastic, or silly phrases from a database of quotation.
44. history
The history command is used for viewing the executed command of your previous terminal sessions.
45. yes
It’s just for fun. On entering yes command, type any text of your choice, and it will print a continuous output stream of a given string.
46. banner
Using the banner command, you can actually create your own personalized banners by printing the ASCII character string in a large letter.
47. rev
rev command takes the input from the user and writes them to the standard output by reversing the lines characterwise.
48. man
You can make use of this command to view the user manual or documentation page of any command we can run on the terminal.
49. tar
The tar command is used for creating an archive and extracting the archive files.
50. whatis
It offers the users to get a one-line manual page description and prints out system commands that match them.
It was arguably difficult for us to handpicked the most useful linux commands among the never-ending list, but we tried to lay down the basic commands that you’ll certainly require to understand how Linux works. We hope it will help you in your future explorations and to strengthen your hold on the working of the operating system.