Getting to master Linux is not a matter of hours or days. Understanding its operation, structures and commands requires, as a rule, practice over many sessions to come to assimilate the underlying concepts in it. The great power of Linux lies in the shell, From which to operate with commands and be able to deploy complex scripts to perform all kinds of functions.
Although each distribution comes to include different programs and some of its own functions, in this news we will present the 5 commands that every Linux user should know.
may be the most important of the whole system is one that allows us to acquire administrator privileges to perform certain special tasks. the order his o superuser do allows, from installing a program on the computer to modify aspects of the hardware or restart the computer. This command is indispensable for any task that requires an elevation of privileges and which the user would typically perform root.
If you have never run a command or performed a task in which the system has informed you that in order to run or run it you need to be root (need to be root), Then you will have to run it with this function, such as: sudo apt-get update.
Sometimes when you run graphics applications like nautilus or launch the text editor gedit, it is preferable that you do not use this command for two reasons. The first is that there is one specific to these cases that is gksudo, And secondly it prevents in this way some hangs on the graphical interface during the execution of these applications.
We could not miss among our favorites the function that allows us to view the contents of a directory. Whether we just created it or not, ls is one of the most versatile commands in all of Linux, As it includes a vast amount of attributes to allow us to view all the properties of files and directories. If the order ls allows us to list the contents of a directory, with ls -la we can also list the attributes of all objects in the directory, including those that have the hidden modifier.
And following with our list of favorite orders we come across the copy command or, what is the same, cp. There are many ways to invoke this command but the underlying idea is always to copy a file to another directory. That’s why it runs through cp filename directory-name and unless we are in the root directory of the place where we want to copy, we will have to enter the whole route or specifying each of the levels with ../.
this command supports the use of wildcards, making it easy to copy many files at once like for example, cp * .txt / home / Luis / Documents.
Another of the orders that every Linux user should know is grep. The main function of this command is look for matches in a string that we specify or, what is the same, to filter the information from a pattern that we enter. Thus, we can use it directly against an existing file, such as grep text mifichero.txt or by concatenation with pipes. The use of pipes gives great versatility to this order, As it allows us to debug the outputs we get from other programs if we run an execution similar to this: cat mifichero.txt | grep text.
This order also allows you to use a large number of wildcards that you return one of the most complex to master thoroughly. That being said, a very useful order and difficult to control deeply.
And to end with this news, knowing that I am leaving many other important orders along the way, I thought it necessary not to forget the instruction allows us to delete a file or directory from our system. We should not confuse rm with rmdir, Since this last command only allows us to delete system directories that are empty.
To delete a file, all we have to do is enter the statement in the terminal rm filename o rm * .txt if we want to delete multiple files. Be very careful if you are going to use the settings -rf, As you may inadvertently delete all information from your computer. You are warned.
We hope this review of the top Linux commands has been instructive to you. If you already knew them you might want to share them with us what other commands you consider essential for every Linux user. Of course, we only support 5 😉