Creating our Aliases

Alias is a simple way to map, bin, join(?) commands. This is the best way to save time when typing long strings of commands. If we type “aliases” in our terminal we should get the default aliases of our system, something like this: ALIASES-DEFAULT

As you may notice, in my case I have two custom aliases: price and subl; the first one is a python script I use to see the crypto market behavior and the second one is simply to open SublimeText.

Modifying our .bashrc file

In order to make our aliases permanent and not only during a section of the terminal we must modify a file called .bashrc, which is usually located in /home/user/ for this we must open it with the text editor of our preference, in my case I will use vim:

vim ~/.bashrc

VIM-ALIASES

We go down until we find the Aliases section and add our command as follows:

alias our-command='command-to-bind'

A clearer example would be the following:

alias price='python3 ~/Desktop/get_price.py'

Where “price” is the command I want to assign to the string: “python3 ~/Desktop/get_price.py”. Now the last thing we have to do is to save the changes and that’s it, that’s it, we have our custom command.

GET-PRICE

That would be all, if you have any doubt don’t hesitate to let me know.