views:

64

answers:

2

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?

+1  A: 

Yup – you'll need to put it in ~/.bash_profile:

alias ls='ls --color=auto'
David Wolever
~/.profile is not read by bash if ~/.bash_profile or ~/.bash_login exists. Additionally, Terminal can be customized to execute bash without '-l' option therefore profile files won't be read in this case.
J.F. Sebastian
+1  A: 

It depends on your shell/system e.g., for bash on Ubuntu check out ~/.bashrc, ~/.bash_profile files.

J.F. Sebastian