contador javascript Skip to content
Contact : alejandrasalcedo0288@gmail.com

40 essential Linux commands you should know

In the context of operating systems in general, and Linux in particular, the term "command" means a command line application or functionality built into the user's shell. However, for the end user, this distinction is of little importance. Both are used in the same way. You enter words in your terminal emulator and generate the results.

The purpose of this article is to list some commands that every Linux user should know, or at least know, in the case of those with a phobia of text-based interfaces. It does not mean listing all useful commands, it is not a list of lesser known utilities and it is not a manual. Its objective is the coverage of the most useful application in everyday life.

As such, it is divided into several categories, corresponding to particular tasks. It does not involve a particular distribution, and although not all of the programs described will be installed by default in each distribution, most of them will be present and the others can be found in the repositories.

Linux commands for file system management

1. ls

By default, list the contents of the current directory. If you provide a route, list the content of that. The useful options to know are -l and -a, a long list format with more information and show hidden files (dots), respectively.

2. cat

If you are given a single file, print its contents in the standard output. If you give more than one file, concatenate them, and then you can redirect the output to a new file. Potentially useful is the -n option, which numbers the lines.

3. cd

Allows you to go from the current directory to the specified directory. If you call it without arguments, return to your personal directory. Calling it with a colon (cd ..) returns it to a directory "above" the current one, while calling it with a dash (cd -) returns it to the previous directory, regardless of where it is in relation to the current one.

4. pwd

Print your current directory. Useful if your message does not contain this information, and especially useful in BASH programming to obtain a reference to the directory in which you are executing the code.