Changes to /etc/bashrc?
I wouldn't change the default /etc/bashrc
. Instead, I would create a new file in
/etc/profile.d/
This way you have something that will survive upgrades. At least in Fedora and earlier RedHat, the /etc/bashrc
contains the following bit of script:
for i in /etc/profile.d/*.sh; do
if [ -r "$i" ]; then
. $i
fi
The last time I wanted to add something globally, I created a new file in this directory with a name ending in .sh
and a csh
version ending in .csh
.
For reference the default Debian bashrc is stored in /etc/bash.bashrc rather than /etc/bashrc.
The /etc/bashrc of most distributions are pretty small and readable. I suggest reading them. If someone could find links to all the major ones, I would vote that up multiple times if I could.