OESF Portables Forum
General Forums => General Discussion => Topic started by: tonyb on June 26, 2004, 04:34:00 am
-
I am trying to append to the PATH for root a hierarchy that starts at :/mnt/cf/...:/mnt/cf/.. etc.
SO I modified /home/root/.profile to append the directories in /mnt/cf, however, going su
from a terminal session, does not include the new PATH???
Thanks for any suggestions.
Hufnus
-
your .profile only gets read once when you log in - this lets you set up environment variables and stuff that you want to be the same across all shells you might use during your login session.
When you su into root, the root .profile is not read because it is not a login shell. Try "su - root" which will force a login shell and you will see the difference.
You will want to put your path modifications for root into .bashrc which gets read every time you start a new shell.
-
Actually you can get away with just "su -" most of the time, just a lazy tip
Stu