[sllug-members]: Environment/Path help

Lamont R. Peterson lamont at gurulabs.com
Tue Dec 12 11:56:49 MST 2006


On Tuesday 12 December 2006 10:52am, weales at xmission.com wrote:
> Ok, I've been using *nix for over six years (and I feel like a total
> n00b for asking this question), but I need to know how to "source" my
> root user environment variables ($PATH) after I su.

Don't "su", run "su -" and everything will be much better.

It's not just the vars that aren't set up properly when you omit the "-" from 
the su command, either.  I always tell my students, "ALWAYS, use 'su -', even 
if you think you know better.

If the change of directory compels you to omit the "-", then run "pwd" 
before "su -", double-click the path, type "cd " and then middle-click your 
mouse (and press <ENTER>, of course). :)

> I ssh into systems as a non-root user and then su.
> How can I easily "source" my root environment?

Just to be entirely clear, sourcing in the environment variables still won't 
completely set things up right.  Some of the missing things can be subtle and 
hard to identify.  Always use "su -" and life will be much better for you.

HTH.
-- 
Lamont R. Peterson <lamont at gurulabs.com>
Senior Instructor
Guru Labs, L.C. [ http://www.GuruLabs.com/ ]

NOTE:  All messages from this email address should be digitally signed with my
       0xDC0DD409 GPG key. It is available on the pgp.mit.edu keyserver as
       well as other keyservers that sync with MIT's.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://sllug.org/pipermail/sllug-members/attachments/20061212/a9bdb25e/attachment.pgp


More information about the sllug-members mailing list