29 Most Used Linux Commands You Should Know Today

Are you new to Linux or just a little rusty? Here are all the commands you’ll need to know. Think of this as an essential reference for the Linux terminal. This applies to the macOS command line, too.

Linux includes a large number of commands, but we’ve chosen 20 of the most important ones to present here. Learn these commands, and you’ll be much more at home at the Linux command prompt.

1. pwd

pwd stands for Print Work directory and does exactly what you think – it shows the directory you’re currently in. This is one of the handiest Linux terminal commands that aims to make new user’s life peaceful by ensuring they don’t get lost in that seemingly cryptic terminal window.


2. ls

The ls command is probably one of the most widely used commands in the Unix world. It presents to you the contents of a particular directory – both files and directories. You will use this command alongside pwd to navigate your ways inside the mighty Unix filesystem.

3. cd

Short for Change Directory, the cd command is behind your movement from one directory to another. It’s one of the few Linux commands that you’re bound to use throughout your stint with the Linux system. This command makes life in front of the terminal less scary for beginners while providing a standard method to browse the entire filesystem of your device.

4. mkdir

Want to create a new folder through the terminal? The mkdir command is created for just this specific purpose. It lets you create folders in anywhere you like in your Linux system – given you have got the necessary permission of course!

5. rmdir

The arch rival of the mkdir command, the rmdir command allows you to delete specific folders from your system without any hassles. Although many utilize the rm command for this purpose, screwing up parameters or even a single character with rm can do things you wouldn’t even dream. So, stick with rmdir for now.

6. df

The df command is one of the most empowering Linux terminal commands that display essential information about the disk space on your filesystem. It is used widely by system administrators to monitor and analyze real-time server or network oriented systems.

7. uname

The uname command is an elementary Linux command for obtaining system information like name, version and other system specific details. You can quickly check your OS and kernel version with this command and can know for sure the instruction length of your machine

8. ps

This is among other straightforward terminal commands that will allow you to visualize what processes are currently run by your machine. It’s a very elegant yet flexible mean to analyze system resources and will enable you to manipulate system processes natively through the terminal. 

9. kill

The kill command is a powerful way to stop processes that are stuck due to resource constraints. As you grow your Linux system skills, you will come to know the essence and importance of this command. Often presented in lists of funny Linux commands, the kill command is as mighty as its name.

10. touch

The touch command is an essential Linux command for creating a valid empty file. You can create files on the go in your terminal and fill them up later or in real-time – based on your requirements. It’s also the go-to command for changing the timestamps.

11. cat

Designed initially for concatenating multiple files, the cat command is used for numerous other purposes since. This is among other Linux commands you will use to create new files, view file contents in the terminal, and redirect output to another command line tool or file.

12. head

The head command allows you to view the beginning of a file or piped data directly from the terminal. It’s one of the most widely used Linux commands by users who works heavily with text processing. Use this command whenever you are going through a lot of files in the terminal to increase your productivity.

13. tail

A compliment to the previous command, chances are you will use the tail command much more than the header commands. A basic Linux terminal command, tail, mixed with cat and echo can do things you wouldn’t even imagine.

14. cp

The cp command is just a short way of telling your machine to copy a file or directory from one folder to another. It is among other de-facto Linux commands you can’t live without. You can copy multiple files to a directory right from your terminal with this neat command.

15. mv

Short for move, it’s a supplement to the cut operation you perform in the GUI. Just like cp, you can use the mv command to move either single or multiple files from one location to another. You can force this Linux command to transfer large files with the -f parameter.

16. less

Another most used Linux command, the less command is widely popular due to the convenience it brings when viewing the contents of a file. Contrary to cat, the less command allows users to navigate within a file in both directions while not interrupting the terminal session.

17. wget

This is one of the best Linux commands network admins leverage to download files from the web right from the terminal. This is among those handy little terminal commands that can be used in scripts or cronjobs and provides users the ability to use the HTTP, HTTPS, and FTP internet protocol.

18. cURL

cURL is a very powerful network tool that makes transferring files over a network a child’s play for even new Linux system users. This is one of those Linux commands designed to work without user interaction and is typically employed in network related shell scripts.

19. find

The find command is one of the most used Linux commands to search for files from the terminal. This compelling yet flexible terminal command allows users to search for files based on certain criteria such as file permissions, ownership, modification date, size, etc.

20. which

The which command is pretty useful if all you are trying to search are executable files. This handy little terminal command takes specific parameters and searches for binary files in the $PATH system environment variable based on them very effectively.

21. locate

The locate command is one of those Linux commands that are used for finding the location of a specific file. It is one of the most straightforward terminal commands that you can leverage when not sure about the location of a particular file on your Linux machine.

22. grep

This is among the most powerful regular expression terminal commands you can use when searching for patterns inside large volumes of text files. It will take the pattern you’re looking for as input and search the specified files for that particular pattern.

23. sed

This is one of the most widely used Linux commands to manipulate each line of a file or stream by replacing specified parts. It is used heavily by users that deal with large volumes of text data and needs to change them on the go.

24. echo

The echo command is a very powerful command line utility that lets you output a specific text to the terminal console. Type in echo followed by some texts within parentheses to find out for yourself. What’s more interesting for this command is that you can pipe the output to other terminal commands.

25. sort

The sort command is quite compelling at the things it does. Whenever you find the need to sort out a file in an alphabetical or reverse manner, utilize this command.

26. sudo

The sudo command is the holy grail of Linux commands. It lets non-privileged users access and modify files that require low-level permissions. Often you will use this command to access root from your regular user account.

27. chmod

The chmod command is among the most powerful Linux commands you will use to change or modify the access permissions of system files or objects. This command can take a very diverse set of parameters from users and based on those change the file permission.

28. chown

The chown command is very much similar to the chmod command. But instead of changing access permissions, it enables users to change the ownership of a file or directory. Both the chmod and chown terminal commands require root privileges to run.

29. whoami

Use whoami to find out who you are logged in as or who is logged into an unmanned Linux terminal.

Share this

Related Reads

Responses (0)