LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   bash: ifconfig: command not found (https://www.linuxquestions.org/questions/linux-newbie-8/bash-ifconfig-command-not-found-596346/)

zebias 11-01-2007 10:23 AM

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.

colucix 11-01-2007 10:28 AM

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.

David1357 11-01-2007 10:55 AM

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.

nkd 11-01-2007 01:12 PM

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

mrrangerman 11-01-2007 01:20 PM

If your running one of the Ubuntu's just type sudo ifconfig give passwd and your set.
Else su to root then ifconfig

Dinithion 11-01-2007 02:01 PM

On ubuntu, all users are allowed to use ifconfig whitout parameters. So I guess he is not on a ubuntu machine.

axelfc 11-01-2007 07:20 PM

Just type /sbin/ifconfig

zebias 11-02-2007 03:14 AM

regards

it worked with /sbin/ifconfig


All times are GMT -5. The time now is 11:21 PM.