LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-09-2002, 12:53 AM   #1
MCSquared
LQ Newbie
 
Registered: Nov 2002
Distribution: RedHat
Posts: 7

Rep: Reputation: 0
Angry ifconfig missing??


I just installed RedHat 8.0 but ifconfig seems to be missing? When I type ifconfig at a terminal prompt I get this:

bash: ifconfig: command not found

I also tried "ifconfig -a" and got the same results.

Tried su to root, still got same results.

I thought ifconfig was an extremely standard Unix utility. Not sure what could be wrong here.
 
Old 11-09-2002, 01:08 AM   #2
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 50
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
 
Old 11-09-2002, 01:19 AM   #3
MCSquared
LQ Newbie
 
Registered: Nov 2002
Distribution: RedHat
Posts: 7

Original Poster
Rep: Reputation: 0
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.
 
Old 11-09-2002, 01:31 PM   #4
int0x80
Member
 
Registered: Sep 2002
Posts: 310

Rep: Reputation: Disabled
Check out the man pages for updatedb and locate.
 
Old 11-10-2002, 01:27 AM   #5
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 50
Also,
man whereis
man which (not as useful to fix the problem you had above, but useful)
 
Old 02-20-2003, 04:59 PM   #6
Mimicafe
LQ Newbie
 
Registered: Feb 2003
Posts: 19

Rep: Reputation: 0
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 -?

Thanks

MimiCafe
 
Old 02-20-2003, 05:04 PM   #7
dorian33
Member
 
Registered: Jan 2003
Location: Poland, Warsaw
Distribution: LFS, Gentoo
Posts: 591

Rep: Reputation: 32
use alias command in your /etc/profile file
 
Old 02-20-2003, 05:08 PM   #8
boonders
Member
 
Registered: Feb 2003
Posts: 47

Rep: Reputation: 15
/sbin/ is missing from the 8.0 path...that is how i solved the problems with ifconfig,shutdown, service, etc.
 
Old 02-20-2003, 10:07 PM   #9
SlickWilly
Member
 
Registered: Dec 2002
Posts: 327

Rep: Reputation: 30
Not missing. Not there - as Moses says - for non root users.

And quite correctly so. This is why it's sbin.. that 's' us for 'superuser' and the programs contained within should be
superuser' programs only.

Here's a link which goes into why in a bit more detail :

http://lists.debian.org/debian-devel.../msg01150.html

Slick
 
Old 02-20-2003, 10:13 PM   #10
boonders
Member
 
Registered: Feb 2003
Posts: 47

Rep: Reputation: 15
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"

you need to add it to the path.
 
Old 02-21-2003, 02:55 AM   #11
Mimicafe
LQ Newbie
 
Registered: Feb 2003
Posts: 19

Rep: Reputation: 0
How do I add path variable

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.

Hope someone will stop-by and help.

Great job guys!

samiyo
 
Old 02-21-2003, 11:32 AM   #12
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 50
Sorry, mistaken post.

Last edited by moses; 02-21-2003 at 11:33 AM.
 
Old 02-21-2003, 03:42 PM   #13
SlickWilly
Member
 
Registered: Dec 2002
Posts: 327

Rep: Reputation: 30
Doh!

Thanks for the hit on that Boonders.

Okay, to add it to your path you would :

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.

Slick.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
connecting /sbin/ifconfig to bash command ifconfig flammable2 Fedora 4 11-12-2005 07:58 AM
ifconfig missing Acronyms Linux - Networking 3 04-15-2005 07:16 AM
ifconfig is missing Zvi Linux - Software 3 12-10-2003 12:56 PM
Missing netconfig, ifconfig, etc ... froedi Slackware 9 11-15-2003 08:49 AM
command ifconfig, route, tracert... missing in /bin mae Red Hat 2 09-18-2003 09:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:35 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration