OESF | ELSI | pdaXrom | OpenZaurus | Zaurus Themes | Community Links | Ibiblio

IPB

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Changing path in .profile
tonyb
post 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
Go to the top of the page
 
+Quote Post
zxerx
post 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.
Go to the top of the page
 
+Quote Post
Stubear
post 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
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 14th September 2014 - 06:03 PM