PDA

View Full Version : ~/.profile and ~/.bashrc in Knoppix



carolus
05-02-2008, 05:10 AM
~/.profile and ~/.bashrc are ignored (as are ~/.bash_profile and ~/.bash_login). So I am currently putting my login commands and ENV=$HOME/.bashrc in /etc/profile. With ENV set and exported, then ~/.bashrc (with my aliases) gets executed.

My question: is there a better way to set the login and nonlogin configurations in Knoppix?

The first time I tried setting ENV, my pre-existing ~/.bashrc was overwritten by a copy of /etc/bash.bashrc, which simply invokes /etc/profile. However, when I appended my own code to the .bashrc created by knoppix, the file persisted and worked as intended.

I don't understand why ENV is working. According to info bash, that should only happen when bash is invoked as sh, yet echo $SHELL returns bash. I only tried it after all else failed.