Problems with ifconfig in Fedora 8

Stuart Sears stuart at sjsears.com
Tue Apr 22 08:26:53 UTC 2008


Pedro Jose wrote:
> Hello:
> 
> In a Fedora 8, and also in a Centos 5.1, when I open a terminal and I
> login as root, I type ifconfig, but the command is not detected.
> However, when I go to a tty, Cntrl + Alt + F1, for example, and I
> login as root, ifconfig is recongnized.
> 
> How can I fix it?

The ifconfig command is in /sbin, which is not on a normal users PATH.

so, you can do one of 2 things:
* type /sbin/ifconfig

or
*change your path to include /sbin (and if you are going to do that, you 
may as well add /usr/sbin as well)

in /home/YOURUSER/.bash_profile:

(at the bottom, ideally)

export PATH=$PATH:/sbin:/usr/sbin

and then logout and login again

> 
> (Sorry for my english, I'm spanish)

not a problem. My Spanish is lousy. :)

Regards,

Stuart
-- 
Stuart Sears RHCA etc.




More information about the users mailing list