After getting used to the use of the system by this means, you realize the agility that the keyboard offers, mainly, when knowing shortcut keys, variables and other tricks allowed by the terminal. As if that weren’t enough, learning to work well with text-mode commands is to understand a little the gears of Linux and what goes on behind the graphical assistants that facilitate some system tasks.

Note that the intention of this article is not to fully explain the use of each of the commands, but to provide a means for beginners to learn about them.

Man: The man command should be at the top of the entire list of important Linux commands. The reason is very simple: just run it to load a man page about the system commands, with definitions not only of the use of each tool, but also detailed descriptions of the numerous parameters of the software and examples of use, to read the man pages is very easy and you just have to execute man followed by the name of the command.

ls: To list the existing files in any directory, just use the ls command. If it is run without parameters, the contents of the directory you are in will be displayed. But you can specify a path for ls, like ls / usr / bin, and if you also want to list the hidden files, which start with a period, use the -a (ls -lha) option.

cd: In the terminal itself, it is possible to navigate the file system using the cd command followed by the path you want to follow. If you run the cd command without parameters, it returns you to the user’s folder, which is located in / home.

cp: Copying a file from the terminal is also easy. Use the cp command followed by the source file and the destination, which can be either a new folder or a new file with a different name.

mv: To move files, there is the mv command that can be used both to transfer files and to rename them. If you want to send the file from one folder to another, just follow the example mv folder1 / file1 folder2 /. If you’d rather just rename it, use mv file1 file2.

more: In case you need to read the contents of a text file, use the more command followed by the path and file name, as in more /home/user/file.txt. The entire content of the file will be displayed in the terminal, filling the screen with the text.

df: Do you want to know what is the total space and how many GB available are in each partition of the system? Use the command df -h. The -h option. If you run the command without this option, the information is displayed in kilobytes and will need to be mentally converted to other units.

sudo: For security reasons, Linux works with user permissions. Therefore, certain commands or files are accessible only by the owner or by the administrator user (root). So that you do not have to change user, at all times, there is the sudo command, which guarantees root user credentials temporarily, by providing a password.

grep: Imagine the following situation: you have a text file with about 200 names of the students of a certain school, the grep command helps you find that student. Just execute the grep command “Student Name” file.txt for the terminal to search for the name that appears within the relationship. In case you’re not sure if the student’s name was case-sensitive, add the -i parameter so that grep ignores this distinction during the search.

clear: Finally, a command that helps organize a bit of the confusion of letters found in the terminal after hours of use. To clear the entire buffer, run the clear command. Afterwards, you just have to use the terminal again normally, as if nothing had happened.


Keep in mind that there are many advantages to using console mode or a terminal emulator.


Un comentario en «Commands in Ubuntu and Linux – Fast Guide»

Deja un comentario

Tu dirección de correo electrónico no será publicada. Los campos obligatorios están marcados con *