I've been adding them to /etc/basrhc, and that works most of the time.
But I noticed that when I su
to another user, I lose all my aliases.
It turns out that /etc/bashrc
is only loaded when the terminal is opened, not on login. And it seems that /etc/profile
is loaded on login. So, is that where I should really have put all those aliases?
You should put them in
/etc/profile.d/buttles_aliases.sh
The
/etc/profile
file probably contains this code:Unfortunate lack of quotes, so don't put a space in your filename.