Tuesday, September 22, 2009

Stumbling into Tips: /etc/profile.d

Well I've been using Linux/UNIX a long time. I've been playing with cshrc, bashrc and profile files for a while to, but for the first time, today I stumbled across an interesting directory, the '/etc/profile.d' directory. Like all '.d' directories in the 'etc' directory this is a directory to put additional configuration files.

For sh-style shells (sh, bash...) /etc/profile.d/*.sh are read and run, for csh-style shells /etc/profile.d/*.csh are run. It's a great place and a clean way to easily plug settings (like $PATH) in and out for new programs you can't get RPMs for. In my case I did so to help setup my jboss installation.

No comments: