Link to home
Start Free TrialLog in
Avatar of joncolby
joncolby

asked on

No ifconfig ?

I just installed fedora core2 and I cannot run ifconfig. not even if I su.
I am new to linux. Is there some directory i have to switch to that containes the 'ifconfig' tool ?
I cannot make my network connection work either. I have used the gui tool, and I have tried putting the nic on dynamic, and static
and have had no luck with either. I dont understand why I cannot surf the web. I put in the ip address, the subnet, the gateway and the dns servers. but I cannot surf the web. This is really bogus.
I need help.
Avatar of sunnycoder
sunnycoder
Flag of India image

Hi joncolby,

try /sbin/ifconfig

if that does not work, then run locate ifconfig

this should tell you where ifconfig is

Sunnycoder
Avatar of joncolby
joncolby

ASKER

ok
I ran locate ifconfig
and it said it was in the /sbin directory
but when I move there and then try to run ifconfig
it says

bash: ifconfig: command not found.

I run fedora core 2
I cannot even ping my gateway.
what the hell ?
I dont know where to begin. I am a new user.
should I just re-install linux ?
it is probably easier for me to do.  .... Hehehe... Look at me.... I am treating it like windows....hehhe..:-)
on your command prompt

/sbin/ifconfig

to run with just ifconfig do this

login as root

$]vim ~/.bash_profile

you will see a line like
PATH=/usr/bin:blah:blah

add to this line /sbin/ ... make sure any two entries are spearated by a :

logout and login
ASKER CERTIFIED SOLUTION
Avatar of Mysidia
Mysidia
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi Mysidia ,

changing PATH from the command line will only be good for that shell instance ... I would recommend changing the bash profile.
joncolby,

If the above stuff does not get you to a point that ifconfig will run, try this:

ping 127.0.0.1

This will try to run the ping command on your localhost IP address.  If this does not work, then TCP/IP networking was not installed, or for some reason is not working at all.

Thanks

255x4
ifconfig should work, as long as /sbin/ is in your path
(Which it actually is only for root)

As "normal" user try /sbin/ifconfig -a to get information of any networkinterface (including loopback)

if you do not have any NICs except loopback shown here, maybe your kernel does not recognize your nic. In this case have a look at google to find out, if your nic is supported or if there is a module, you cna load, but that is another story ;-)

looking at your posting above:
if you change into /sbin, then you have to run ./ifconfig as this ./ tells your shell to look for the specified command in the current directory and not in the directories listed in $PATH