Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I automatically load alias on startup?

Tags:

linux

I am trying to add the alias ll = "ls -l", and I am wondering how can I load it every time I login to linux.

like image 512
Strawberry Avatar asked Oct 17 '10 04:10

Strawberry


People also ask

Where is .bash_aliases located?

bash_aliases is present under the user home directory and load it whenever you initiate a new terminal session. You can also create a custom alias file under any directory and add definition in either . bashrc or . profile to load it.

Where are alias stored?

Aliases allow you to define new commands by substituting a string for the first token of a simple command. They are typically placed in the ~/. bashrc (bash) or ~/. tcshrc (tcsh) startup files so that they are available to interactive subshells.


1 Answers

You can add it to your ~/.bashrc file in your home directory.

For more information on .bashrc and the likes, see this question.

like image 158
cschol Avatar answered Sep 27 '22 15:09

cschol