LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (http://www.linuxquestions.org/questions/fedora-35/)
-   -   ifconfig doesn't work (http://www.linuxquestions.org/questions/fedora-35/ifconfig-doesnt-work-326254/)

ccerino 05-23-2005 11:49 AM

ifconfig doesn't work
 
When I am logged in as a user or as root, I am told that ifconfig isn't a valid command, so I figured that for some reason it wasnt put in my /usr/bin command list so i cd to the sbin dir where it is and tried it from there, still no luck. I have never had this problem before. What is up with this command?

Boby 05-23-2005 12:03 PM

Gain root access with
Code:

su -
.
Then try again ifconfig.

Boby

ccerino 05-23-2005 01:10 PM

already tried that remember. Pleas read my original post.

win32sux 05-23-2005 01:13 PM

Quote:

Originally posted by ccerino
already tried that remember. Pleas read my original post.
your original post doesn't say you tried the "-" option...

ccerino 05-23-2005 04:03 PM

Alright here is an update.

while i am longed in as my self i still have the problem. if I su in i still have the problem. if i su - in idont have the problem, and if i directly log in as root i dont have the problem.

snarkout 05-23-2005 04:10 PM

Are you just running "ifconfig" to see your interfaces, or are you assigning an IP or something? Meaning, is the issue possibly syntax? What do you get if you do a "which ifconfig" or a "type ifconfig"? In /sbin did you execute "ifconfig" or "./ifconfig"?

edit: I missed your last post - your problem is your "environment" and specifically your path. Either log in as root, or use "su -" to remedy the issue (as you've seen). This is not a bug, it's a feature.

terrapin24h 05-23-2005 04:22 PM

ccerino--
reason is that the "su" command grants you root privs, but does NOT load the root user environment(more pointedly, you don't get root's "PATH" variable) doing the "su -" gets you root's path and IIRC home dir too. The same thing as logging in as root. It's not a problem, it's actually by design. By default only root can do ifconfig, and the system will only find it when root's enviro is loaded

Boby 05-24-2005 02:33 AM

Quote:

Either log in as root...
I wouldn't recommend logging in as root in X!

Boby

dareino 05-24-2005 09:09 PM

ccerino--
reason is that the "su" command grants you root privs, but does NOT load the root user environment(more pointedly, you don't get root's "PATH" variable) doing the "su -" gets you root's path and IIRC home dir too. The same thing as logging in as root. It's not a problem, it's actually by design. By default only root can do ifconfig, and the system will only find it when root's enviro is loaded


dang...I just learned something today!!!!! Im such a newb :p
thxs
dareino

brian2009 08-04-2009 11:53 PM

Thank You
 
Just want to say thank you from a newbie on everyone's insight


All times are GMT -5. The time now is 10:52 AM.