
How do I get my environment to come along when I "su"?
A reader writes:
Here is the problem - when I su to become root I don't have any aliases or any stuff in my path. I also am not sure were the .bash_profile for root goes and if it is even read when su'ing - please help thanks. In terms of where root has its "rc" files, the best way to ascertain that is to identify the HOME directory for the root account by using grep: grep root /etc/passwdQuite often, root has its home in the directory / or, sometimes, /home/root. You could then easily copy all of your own "rc" files into that directory to ensure that your root environment is functionally identical.
Help others find this article at Del.icio.us, Digg, Netscape, Reddit, and Simpy.
Categorized:
Unix and Linux Help
(Article 3688)
Tagged: Previous: And a nice review of "Wicked Cool Shell Scripts" Next: How do I tweak my PATH? Subscribe!
Never miss another useful Q&A article again! Subscribe to AskDaveTaylor with Google Reader. How do I get my enviroment to change back to my previous enviroment. Posted by: TIMOTHY at August 15, 2005 4:57 PMI have a lot to say, but ...
I do have a comment, now that you mention it!
|
Search
Find just the answers you seek from among our 1700+ free tech support articles by using our Lijit search engine.
Help!
Subscribe to
Ask Dave Taylor!
Free Updates!
Sign up and get free weekly updates and special offers on books, seminars, workshops and more.
Articles and Reviews
Auctions and Online Shopping Blogs and RSS Feeds Building Web site traffic Business and Management Cell Phones and Mobile Phones CGI Scripts and Web Site Programming Computer and Internet Basics d) None of the Above HTML and CSS Mac OS X Help MySpace, Facebook, Twitter and Social Network Help Pay Per Click (PPC) Search Engine Optimization Shell Script Programming Sony PSP, MP3 Players, Etc. The Writing Business Unix and Linux Help Video Game Tips and Help Windows Help
Recent Entries
Join the List!
Book Links
|