Speed up your work with Bash aliases

Whether you like or not Terminal in Linux, it's very useful and sometimes necessary. So, to speed up your work you can use "aliases" for commonly used commands. For example: when I type "aa", "apt-get install" is executed.

To enable "aliases" it's very simple, just follow these steps:

1. with your favorite editor open .bashrc (located in your home directory)

2. add this line

aliases xx="command"

3. open terminal and execute this command:

source ~/.bashrc

You can add as many aliases as you want but every time you need to reload bash with "source ~/.bashrc".

If you want to use aliases for the commands that can be executed only by root, edit .bashrc from your root directory, and execute "source ~/.bashrc" as root.

0 comments:

Post a Comment