Adding Aliases Into .Bashrc

Adding Aliases Into .bashrc

When you boot into your Linux OS, the .bashrc file, an others will load variables and aliases which can be used within the command line. There are many reasons why users will want to add variables and aliases. One of the main reasons why users want to take advantage of these aliases and variables is to cut down on typing. If you are a web developer, you may find you will have files nested inside many folders, since the default file directory is /var/www. If you like to create may projects, the directories can find a way to grow and grow.

To make an alias,

 user# alias mymaindir="cd /var/www/scrapers/website/" 

To make the alias usable without rebooting,

 user# source ~/.bashrc 

To navigate to your chosen directory,

 user# mymaindir