Essential Linux Commands: Learn How to Use Them
If you are a beginner in the Linux universe, you must have heard about the list of main Linux commands, with some names that may seem a bit "intimidating" at first, and functions that are somewhat specific.
But the truth is that these Linux commands are not that difficult to learn and put into practice — you just need clear and direct content that helps you better understand all the commands.
With you in mind, the Linux Certification team developed this complete article, with everything you need to know about the main Linux commands and how to use them. Just read until the end. Follow along!
How to use the main Linux commands:
Before you start using the main Linux commands, you need to understand how to use them and how they actually work. After all, it's impossible to apply something you don't even know the purpose of, right?
That said, keep in mind that Linux commands are mostly in text format, entered in a system operating terminal for reading.
By entering the correct commands, specific for each function, actions can be performed automatically, making the work of Linux users in their daily routine easier.
Nano command
The first command to be learned by beginners in the Linux universe is the nano command. This command is very similar to Notepad, present in the Windows operating system, but is intended exclusively for the Linux terminal, where all commands are executed.
Nano works as a "mini" text editor, with specific functions within it. With it, you can open and read files, like texts, check the spelling of the piece, cut and paste sections, search for specific terms, and other secondary functions.
Each of these subcommands is activated by selecting the control key ("ctrl") and the letter that represents the desired function.
The nano command itself displays a panel with the letters and their corresponding actions, so the user just needs to select them. The combinations are:
- Control and X: press to exit editing. Like in other text editors, nano will ask if you want to save the file or not;
- Control and G: opens the nano's own help screen and the list of short commands;
- Control and O: used to write to the file;
- Control and J: has the function of justifying the text;
- Control and R: read a different file, allowing you to add text fragments from it to your main file that is open in nano;
- Control and W: find a term within the text;
- Control and K: responsible for cutting the text;
- Control and U: pastes the cut text;
- Control and C: shows the current cursor position.
- Control and T: checks the spelling of the entire text;
- Control and S: responsible for saving the file;
- Control and A: move the mouse pointer to the beginning of the line;
- Control and E: move the mouse pointer to the end of the line;
In summary, the nano command in Linux has the function of editing text files through the terminal.
Watch command
In simple terms, the watch command repeats the execution of another command periodically. With it, you don't need to manually execute these commands from time to time.
The watch command also displays letters with subcommands to configure the desired repetition structure. The main ones are:
- -d, which highlights what changed on each update;
- -n X, responsible for setting the repetition interval to X seconds;
- -t; which disables the header;
- -g; whose function is to stop executing if the command output changes.
Script command
This is responsible for scripting or creating an execution structure for commands entered in the Linux shell, with the possibility of inserting or not inserting a time interval between executions.
Thus, the script command can be a "lifesaver" for those who need to document and record the entire installation process of a software or application, so that it is later possible to verify the path followed.
To create and start it, just run this path:
- $ script arquivo.log
Cd command
The cd command in Linux has a very simple function: show or change the directory where a file is located. With it, the opposite can also be done: enter the path of a file and open it.
To do this, just enter:
- cd images/ (if you have a folder with this name on your computer, it will enter it);
- to access a file inside this folder, just add cd images/subfolder/file-name (this way, you access the file inside the images folder);
Ls command
On the other hand, the ls command is responsible for listing existing files, filtering the search results by the initial letter or character of the files.
This feature is interesting because it clearly shows all the files present on your computer.
It is also possible to add other filters to the search, such as separating by commas, showing by columns, and even differentiating files by color.
Some commands are:
- –color=auto, which separates files by color;
- -a, –all, which shows all files, even hidden ones;
- -A, –almost-all, which shows almost all files, except the "." and ".." entries
- -m, which creates a list of all files separated by commas.
Rm command
The rm command is responsible for removing files and directories, according to your permission as a user. For this, there are the subcommands:
- -f, which removes files without prompting the user;
- -r, -R, which removes both the directory and its contents;
- -i, which asks for user confirmation before removing;
- -d, –dir, responsible for removing empty directories;
Find command
To locate files, simply use the find command. When running it, you need to specify the starting location of your search, that is, where you want the command to start running from.
The base search syntax is as follows:
- find [path] [expression]
Grep command
The grep command in Linux is responsible for searching for words or terms within all text-formatted files in the system, in order to display the searched content.
To activate it, you need to use the following syntax:
- grep [options] regex [files];
- or: command | grep [options] regex.
"Options" are the filters you want to add to the command, for a more selective search, while "files" are the names of the files you want to find.
Chmod command
Finally, the chmod command can change all user accesses to modify and view system files.
There is a hierarchy between who creates the file, who has access to edit, and who can only view without making any changes. Within this command, there are several subcommands that change these settings, such as:
- Chmod 644;
- Chmod 755;
- and Chmod 555.
Each of them can be applied in practice to change user access to certain system files.
Deepen your Linux knowledge with our online course! Enroll now!
Conclusion

Although it presents various technical terms and execution syntaxes, the main Linux commands are simple to understand and learn — even more so to execute.
To be successful in the Linux universe, the secret is having access to good content, with a good instructor.
This is what happens here at Certificação Linux: we have various content-rich courses for different learning levels and objectives, all taught by Professor Uirá Ribeiro, who has over 23 years of career experience. It's worth checking out!
That was just one piece. The course teaches the whole path — from your first command to exam day.