LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 11-01-2007, 11:23 AM   #1
zebias
LQ Newbie
 
Registered: Nov 2007
Location: Harare Zimbabwe
Distribution: Red Hat 9
Posts: 17

Rep: Reputation: 0
Question bash: ifconfig: command not found


[zeb@localhost zeb]$ ifconfig
bash: ifconfig: command not found

this is wat i get evrytym i use the ifconfig command. i understand i have to change my path. what is the reason for that and why how is that donee.
 
Old 11-01-2007, 11:28 AM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976Reputation: 1976
The command ifconfig is available to root only. As a normal user you won't use this command for safety reasons, since it may alter or break the network configuration.
 
Old 11-01-2007, 11:55 AM   #3
David1357
Senior Member
 
Registered: Aug 2007
Location: South Carolina, U.S.A.
Distribution: Ubuntu, Fedora Core, Red Hat, SUSE, Gentoo, DSL, coLinux, uClinux
Posts: 1,302
Blog Entries: 1

Rep: Reputation: 107Reputation: 107
Re: bash: ifconfig: command not found

Try running

# sudo bash
# which ifconfig
# echo $PATH

That will start bash with root privileges. The second command shows you where ifconfig is located. The third command shows you the setting of root's path.
 
Old 11-01-2007, 02:12 PM   #4
nkd
Member
 
Registered: Oct 2006
Location: india
Distribution: fedora 8, ubuntu 10.10
Posts: 315

Rep: Reputation: 34
hi,
First do a updatedb and then slocate ifconfig.
This will tell you where is the ifconfig executable in your machine. It is generally in /sbin dir.
there is a .bash_profile file in your home dir. ( if you are root then it is /root or else as user1 your home dir is /home/user1.)
open the file in editor and add the following :-
PATH=$PATH:/sbin
You should be through.
nishith
 
Old 11-01-2007, 02:20 PM   #5
mrrangerman
Member
 
Registered: Oct 2007
Location: MI
Distribution: Debian Slackware
Posts: 528

Rep: Reputation: 50
If your running one of the Ubuntu's just type sudo ifconfig give passwd and your set.
Else su to root then ifconfig
 
Old 11-01-2007, 03:01 PM   #6
Dinithion
Member
 
Registered: Oct 2007
Location: Norway
Distribution: Slackware 14.1
Posts: 446

Rep: Reputation: 59
On ubuntu, all users are allowed to use ifconfig whitout parameters. So I guess he is not on a ubuntu machine.
 
Old 11-01-2007, 08:20 PM   #7
axelfc
Member
 
Registered: Jan 2006
Distribution: ArchLinux
Posts: 175

Rep: Reputation: 34
Just type /sbin/ifconfig
 
Old 11-02-2007, 04:14 AM   #8
zebias
LQ Newbie
 
Registered: Nov 2007
Location: Harare Zimbabwe
Distribution: Red Hat 9
Posts: 17

Original Poster
Rep: Reputation: 0
regards

it worked with /sbin/ifconfig
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
ifconfig: command not found mjm70 Red Hat 12 08-16-2011 02:04 AM
connecting /sbin/ifconfig to bash command ifconfig flammable2 Fedora 4 11-12-2005 08:58 AM
ifconfig: command not found hetzme Linux - General 2 06-27-2005 01:27 PM
ifconfig!! Command not found!! Azzath Linux - Networking 5 03-01-2005 08:37 AM
ifconfig: command not found anne Linux - Networking 3 04-18-2004 04:08 PM


All times are GMT -5. The time now is 06:54 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration