Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
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.
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152
Rep:
how do you su to root?
su -
will set up root's environment correctly, whereas
su
will leave the environment of the non privliged user. Since /sbin is not
normally in the path of non root users, you need to either specify the
entire path to ifconfig (/sbin/ifconfig) OR become root entirely, which
means using the first command above (su -)
Read the man page: man su
Thanks, that did the trick. I did not know about the dash with su (I just did "su") and previously did not know what path in which to look for the ifconfig executable.
I've trying for 3 days to figure out why Redhat refuse to execute ifconfig, init 6, shutdown and lot other standard commands. Now I tried su - and it responded. I hope it will work with the rest of the commands not found earlier . Now how do fix it permanently to take su as superuser; such that I need to enter only su and not su -?
no...its not included in the path for a superuser either in REDHAT 8.0. As root, if i type "ifconfig" from the command line, you get "command not found"
Everyone suggest adding the path variable, but how do I go about that. If it takes a few commands to fix that, just say how.
I may need to read some reference books on that if no one could say how to do that.
1) vi .bash_profile
2) Look for the line like : PATH=$PATH
3) arrow to the end of the line
4) press i
5) type :/sbin:/usr/sbin
6) hit 'escape'
7) type :wq
8) log out, login.
9) ifconfig
You have to wonder what Redhat were thinking. I admit I loaded up 8.0 once, and had so many problems with it, I backed down to 7.3. I probably did the above very early on and didn't stop to think that it wasn't something *I* did wrong.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.