On linux there's usually a global bashrc file (
/etc/bashrc). On FreeBSD however bash doesn't seem to support this feature. What's the best way to add a system-wide bashrc then?
This one had me thinking for a bit, so I checked out the bash installations I have on my solaris (9 and 10) and FreeBSD servers. Turns out, that the only place that bash looks for bashrc is ~/.bashrc.
The thing is, this isn't just a Solaris or FreeBSD thing. I checked the man page and the only profile stuff checked is the /etc/profile or the various files in the user's home dir. So, the likely culprit is distro customization. So, on the linux servers -- Centos, in this case --
From ~/.bashrc :
# Source global definitions if [ -f /etc/bashrc ]; then . /etc/bashrc