[CentOS-docs] becoming root
ra+centos at br-online.de
Mon Apr 7 11:02:14 UTC 2008
Ned Slider wrote:
> Any suggestions as to where might be an appropriate home for this on the
I think TipsAndTricks is appropriate for that, maybe under "Admin Tricks
and shell one-liners"? I don't see it under "HowTo" ...
> su -
> but the above are NOT the same thing.
... but the two commands above behave differently.
> When you become root by using 'su -', you also adopt root's PATH whereas
> using just 'su' retains the original users PATH, hence why becoming root
> using just 'su' and trying to run a command located in /usr/local/sbin,
> /usr/sbin, or /sbin results in a 'command not found' error.
Please mention the bash manual page (and the section about login
shells), where this behaviour is explained in more detail.
Otherwise: Go ahead.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://lists.centos.org/pipermail/centos-docs/attachments/20080407/c02f5adf/attachment.bin
More information about the CentOS-docs