Solved

No ifconfig ?

Posted on 2004-08-03
8
2,568 Views
Last Modified: 2013-12-06
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.
0
Comment
Question by:joncolby
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
8 Comments
 
LVL 45

Expert Comment

by:sunnycoder
ID: 11701093
Hi joncolby,

try /sbin/ifconfig

if that does not work, then run locate ifconfig

this should tell you where ifconfig is

Sunnycoder
0
 

Author Comment

by:joncolby
ID: 11701300
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
0
 

Author Comment

by:joncolby
ID: 11701322
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..:-)
0
 Database Backup and Recovery Best Practices

Join Percona’s, Architect, Manjot Singh as he presents Database Backup and Recovery Best Practices (with a Focus on MySQL) on Thursday, July 27, 2017 at 11:00 am PDT / 2:00 pm EDT (UTC-7). In the case of a failure, do you know how long it will take to restore your database?

 
LVL 45

Expert Comment

by:sunnycoder
ID: 11701353
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
0
 
LVL 23

Accepted Solution

by:
Mysidia earned 500 total points
ID: 11708675
Try
su -
PATH=$PATH:/sbin

Now run  ifconfig -a

If it lists eth0, then you know your NIC's driver is loaded

To adjust your network configuration manually, look for a file called

 /etc/sysconfig/network-scripts/ifcfg-eth0

How to set it up depends on what kind of hardware and network you're connecting your computer to.
It may be more involved if you're connecting the system to a DSL modem for instance (needing to use PPPoE),
than if you're just trying to talk with another system on a LAN. Try pinging another host on the internet to rule
out DNS...

i.e.  ping 64.233.161.104

0
 
LVL 45

Expert Comment

by:sunnycoder
ID: 11712241
Hi Mysidia ,

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

Expert Comment

by:255x4
ID: 11721047
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
0
 
LVL 1

Expert Comment

by:sumpi
ID: 11724245
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
0

Featured Post

 Database Backup and Recovery Best Practices

Join Percona’s, Architect, Manjot Singh as he presents Database Backup and Recovery Best Practices (with a Focus on MySQL) on Thursday, July 27, 2017 at 11:00 am PDT / 2:00 pm EDT (UTC-7). In the case of a failure, do you know how long it will take to restore your database?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question