LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 06-21-2004, 02:39 AM   #1
AskMe
Member
 
Registered: Jul 2003
Posts: 123

Rep: Reputation: 15
problem with 'ifconfig' ?


I am using Red Hat 9, when I give the following command "ifconfig" to check information about NIC and TCP/IP then I get following error.......

bash: ifconfig: command not found


What is the problem? How can I check that NIC, TCP/IP are installed and working!!!
 
Old 06-21-2004, 02:53 AM   #2
SBing
Member
 
Registered: Mar 2004
Posts: 519

Rep: Reputation: 35
Don't you have to run ifconfig as root?

su
<type in your root password>
ifconfig

If that fails:

su
updatedb
<wait...if you have a large HD with a lot of files, go for a jog...10 miles should do it... :D >
slocate ifconfig

Steve
 
Old 06-21-2004, 03:14 AM   #3
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,729

Rep: Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919Reputation: 5919
You only need to be root to change configuration. The reason for the "command not found" error is that /sbin is usually not in a users path environment.

/sbin/ifconfig
 
Old 06-21-2004, 11:25 PM   #4
AskMe
Member
 
Registered: Jul 2003
Posts: 123

Original Poster
Rep: Reputation: 15
I am login as a root!!!

I am login as a root to run 'ifconfig' command but still the same problem. Please let me know what to do? How can I configure my NIC and TCP/IP?
 
Old 06-22-2004, 01:27 AM   #5
maxut
Senior Member
 
Registered: May 2003
Location: istanbul
Distribution: debian - redhat - others
Posts: 1,188

Rep: Reputation: 50
become root with "su -" command. "su -" will load the root's path environments.
or when u r root, just try:
/sbin/ifconfig

u can use "netconfig" command to configure your network. surely u must be root to do that.
 
Old 03-04-2008, 06:34 AM   #6
AskMe
Member
 
Registered: Jul 2003
Posts: 123

Original Poster
Rep: Reputation: 15
I can run command /sbin/ifconfig and see all the interfaces if I login as a root. But still I cannot run simply ifconfig. What I have to modify to simply run ifconfig.
 
Old 03-04-2008, 07:04 AM   #7
vimal
Red Hat India
 
Registered: Nov 2004
Location: Kerala/Pune,india
Distribution: RedHat, Fedora
Posts: 260

Rep: Reputation: 36
Hello,

It seems that the path /sbin has not been set in your profile. Execute the command :

# export PATH=$PATH:/sbin

Also add the following line to your .bash_profile :

PATH=$PATH:/sbin

Now try executing the command 'ifconfig' and check if there are errors.

Regards,

Vimal Kumar
 
  


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 problem Gnute Solaris / OpenSolaris 1 07-10-2005 12:49 PM
ifconfig problem Beat-Owen Slackware 2 03-30-2003 01:51 PM
ifconfig problem chens_83 Linux - General 1 02-15-2002 09:51 PM
ifconfig problem cape95 Linux - Networking 1 10-26-2001 05:37 PM

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

All times are GMT -5. The time now is 06:00 AM.

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