How to keep aliases in multiple shell sessions?
Question
I want to set up some alias and would like to keep them so I don't have to reset them every time I have a new Terminal open. How can I do that? Would it require modifying hidden files?
EDIT: I'm using Mac, I found a bashrc under /etc, is it the one?
Solution
It depends on your shell/system e.g., for bash on Ubuntu check out ~/.bashrc
, ~/.bash_profile
files.
OTHER TIPS
Yup – you'll need to put it in ~/.bash_profile
:
alias ls='ls --color=auto'
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow