![]() ![]() |
Jun 26 2004, 12:34 AM
Post
#1
|
|
|
Group: Members Posts: 8 Joined: 12-April 04 Member No.: 2,822 |
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 |
|
|
|
Jun 26 2004, 01:57 AM
Post
#2
|
|
![]() Group: Members Posts: 61 Joined: 11-April 04 From: Sydney Member No.: 2,793 |
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. |
|
|
|
Jun 26 2004, 05:26 AM
Post
#3
|
|
![]() Group: Members Posts: 1,164 Joined: 17-December 03 From: Melbourne, AUSTRALIA Member No.: 1,219 |
Actually you can get away with just "su -" most of the time, just a lazy tip
Stu |
|
|
|
![]() ![]() |
|
Lo-Fi Version | Time is now: 20th June 2013 - 03:46 AM |