[opensuse] adding a path for root
Hello, Using bash on a Suse 10.2 system and have added a PATH to /etc/profile for the other users, I can't find where I can add the path for root. There is no .bash_profile file to edit. How can I also add a new path for root. Thank you for your help. James -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
"James D. Parra"
There is no .bash_profile file to edit. How can I also add a new path for root.
Just create that file in root's home directory. Be warned though that this file with only be sourced by bash, so if you have a script that uses another sh compatible shell, it will not source it. However, if you name the file .profile, it will be sourced by all sh compatible shell, including bash. Charles
James D. Parra wrote:
Hello,
Using bash on a Suse 10.2 system and have added a PATH to /etc/profile for the other users, I can't find where I can add the path for root.
There is no .bash_profile file to edit. How can I also add a new path for root.
Thank you for your help.
James
Hi James, You can use the .bashrc file in roots home directory. If it's not there create it. Example: PATH=$PATH:/path/to/add export PATH Regards, Phil -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Phil Savoie
You can use the .bashrc file in roots home directory. If it's not there create it.
True, one can use .bashrc for this too. For people who don't know, the difference is that .bashrc is sourced every time a new copy of bash is launched, where as the profile files are only sourced once during login. Charles
* Charles philip Chan
True, one can use .bashrc for this too. For people who don't know, the difference is that .bashrc is sourced every time a new copy of bash is launched, where as the profile files are only sourced once during login.
But again, .bashrc *only* works with bash. -- Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711 http://wahoo.no-ip.org Photo Album: http://wahoo.no-ip.org/gallery2 Registered Linux User #207535 @ http://counter.li.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (4)
-
Charles philip Chan
-
James D. Parra
-
Patrick Shanahan
-
Phil Savoie