LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-31-2008, 03:14 PM   #16
PTrenholme
Senior Member
 
Registered: Dec 2004
Location: Olympia, WA, USA
Distribution: Fedora, (K)Ubuntu
Posts: 4,187

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354

Quote:
Originally Posted by acat800 View Post
locate ifconfig
/sbin/ifconfig
/usr/share/man/de/man8/ifconfig.8.gz
/usr/share/man/fr/man8/ifconfig.8.gz
/usr/share/man/man8/ifconfig.8.gz
/usr/share/man/pt/man8/ifconfig.8.gz


echo $SHELL
/bin/bash

type ifconfig
ifconfig is /sbin/ifconfig

echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

ls -l {/bin:/usr/bin,/sbin,/usr/sbin,/usr/local/sbin}/ifconfig
ls: cannot access /bin:/usr/bin/ifconfig: No such file or directory
ls: cannot access /usr/sbin/ifconfig: No such file or directory
ls: cannot access /usr/local/sbin/ifconfig: No such file or directory
-rwxr-xr-x 1 root root 71628 2007-08-23 11:44 /sbin/ifconfig

mount |grep ^/dev
/dev/mapper/VolGroup00-LogVol00 on / type ext3 (rw)
/dev/sda1 on /boot type ext3 (rw)
/dev/sdb1 on /mnt/windows type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)

type ifconfig
ifconfig is /sbin/ifconfig
O.K., that does show that /sbin is in you path, and that ls can find it.

So, what does the command file /sbin/ifconfig show? It should be something like this:
Code:
$ file /sbin/ifconfig
ifconfig: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, stripped
 
Old 03-31-2008, 04:20 PM   #17
simplicissimus
Registered User
 
Registered: Mar 2008
Posts: 104

Rep: Reputation: 15
Fedora 8 /sbin/ifconfig doesn't need root

I have Fedora 8 running and you don't have to be root to see /sbin/ifconfig. Only thing that it requires the full path, since /sbin is not in a cmmon user's PATH.

Code:
$ ls /sbin/ifconfig
/sbin/ifconfig
I can even run it as a regular user to get the default output.

Regards,
SIMP

Fedora User

Last edited by simplicissimus; 04-02-2008 at 05:13 AM.
 
Old 03-31-2008, 08:22 PM   #18
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
Yeah that missing hyphen will get you every time..

Simple solution to a seemingly complex problem
 
  


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
Require Linux/Perl equivalent command for windows Command alix123 Programming 7 08-19-2005 02:23 AM
equivalent command in fedora pa_ash Linux - Newbie 1 06-28-2004 02:52 AM
equivalent command in fedora pa_ash Linux - Software 0 06-28-2004 01:27 AM
ifconfig command shoot2kill Linux - Networking 10 10-22-2003 12:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:37 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