You are not logged in.
Hi,
I would like to set some system-side aliases and from what I read /etc/bash.bashrc is the correct place to put them.
However, it seems that the root account doesn't load this file.
What is the correct way to define system-wide aliases?
Thanks.
Offline
To be more specific, the aliases are not visible when I use a login shell i.e. 'su -'.
According this explanation http://stefaanlippens.net/bashrc_and_others this is correct.
So, do I need to duplicate the aliases in /etc/profile so they are visible from login shells? Or there is a way to define system-wide aliases for
login and non-login shells?
Thx.
Offline
So, do I need to duplicate the aliases in /etc/profile so they are visible from login shells?
you could source /etc/bash.bashrc from /etc/profile. just like ~/.bash_profile usually sources ~/.bashrc
//github/
Offline
Initially I created .bash_profile and .bashrc for root and in the latter I was sourcing /etc/bash.bashrc but your solution is simpler.
Thanks.
Last edited by dabd (2009-11-11 09:29:34)
Offline