Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
it's not about updating that. It's how the command works.
su - will also load the root's environment, so it will also update the PATH variable. All the sbin directories are in the root's PATH but not in the user's path because in those directories there are commands that only root will probably want to execute.
su does not load the root's environment, so the only commands you can access without having to type the full path to the command are the ones that are in your users path.
Yes, indeed .. I am confused by the question also. su is expressly and carefully designed to do this... It becomes extremely important, both for security issues (to make sure that the su environment sees and uses exactly what it's supposed to (don't forget that it can be used to invoke users other than root!) ... and for correct operation in "chroot" situations.
oh, i understand now. I've used linux for a decent amount of time and I've never known that. Some distros act differantly but the way that you are explaning it makes sense. So if I install ndiswrapper and want to be able to run it as reg user or a su I need to copy it into my user's /sbin/ directory. Is that correct?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.