So I have been playing around with aliases in bash and it is easy enough to add them.

alias lsl="ls -l"

My question is, where are they stored? I am using the bash shell, so I looked in the obvious places .bash_alias, .bashrc, etc... and these alias are nowhere to be found. Now, I guess if I had created a .bash_alias file they would have gone there, but since I never did, they must be stored somewhere else on my computer but I can't find them.

Can someone give me some ideas of where to look?

  • Are you using bash? The default is zsh and it would read from other files like .zshrc
    – Ezekiel
    Commented Feb 3, 2021 at 22:13

1 Answer 1


bash aliases you create by running the alias command are not stored anywhere, they are gone as soon as you exit the shell.

To make persistant aliases which will be available in all newly executed bash shells add the definition to ~/.bashrc. You can then also run source ~/.bashrc after adding new definitions to have them included in a running shell.

  • Ahh. That makes perfect sense. So once I exit the terminal they will all vanish, which would explain why I can't find them stored anywhere. Ok. Thanks for the answer!
    – adamf
    Commented Feb 3, 2021 at 21:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .