There is a very simple way to customize and make easier some commands that we normally use in "the console", Through the use of Alias.
Un Alias as its name indicates, it will help us to replace a word or series of words with a shorter and simpler one. Let's take a practical example, let's say we want to see the logs from the system, using an application called Colorizer which is responsible for coloring the result on the console. The line would be:
$ sudo tailf -n 5 /var/log/syslog | ccze
But I'm sure it would be easier if instead of writing all that, we put in the console for example, something as simple as:
True? It would be much more comfortable and easy to remember. Then, how do we do it?
Creating an Alias.
Creating an alias is really easy. The syntax would be:
alias short_word = 'command or words to replace'
if we take the previous example it would be:
alias syslog = 'sudo tailf -n 5 / var / log / syslog | ccze '
The command is enclosed in single quotes. But the question is Where do we put this? Well, if we want it to be only temporary, we simply write it in the console and it will last until we close it.
Now, if we want it permanently, we put this inside the file ~/.bashrc which is in our / Home, and if it is not, then we create it (always with the dot in front). When we have added the line of the alias In this file, we simply put in console:
$ . .bashrc
Note: Yesterday due to problems with our ISP we could not publish anything in <° Linux, for which we apologize