Reputation: 23
I've created some aliases in a bash_profile
(followed this) but when I open a new Terminal
i need to write source ~/.bash_profile
to use them.
I'd like to use the aliases as soon as I opened new Terminal
windows, what should I do?
Upvotes: 0
Views: 887
Reputation: 823
Josh Staiger gives a good summary in his blogpost ".bash_profile vs .bashrc", summarised below:
So if you'd like to use newly created aliases as soon as you open a new terminal window, the solution is to use .bashrc instead of .bash_profile for your aliases.
The blog post includes some more details about synchronising PATHs that you set in .bashrc for logged in and non logged in shells, that may or may not be relevant to your specific problem.
Upvotes: 3