ifconfig not working as expected...
(Sorry if my RE is a little vague, unsure how else to word this!)
So I've finally settled on CentOS. Stable (AFAIK), looks good, and easy enough, yet not too easy enough. Make sense? Heh... Well, up until a couple of days ago, ifconfig stopped working for me. Rather.... That command alone gives me the bash: ifconfig: command not found response. However... When I enter in /sbin/ifconfig command, it works fine. Now, thanks to my friend Google, I know that ifconfig resides in that directory. I know that I can run with the /sbin/ in front of the command, and I can go on my merry way, and live the rest of my life underneath my umbrella of content. But lets be honest. I want it back! Heh So I'm not sure what else I can give you so that you can just say, "Oh do this, that, and bodaboombadabing, you are back in business!". And all I can speculate, is that something happened to the 'link?' or whatever got debunked. So.... Ok. I'm ranting now. TIA!!!! =D |
Check /sbin dir listed in your path variable
provide output of below command Code:
echo $USER |
Code:
[shaun@localhost sbin]$ ls |
Quote:
Any way you are loging through non-root user. /sbin dir not listed in non-root user's PATH. only root or privileged users can run commands of /sbin /usr/sbin and /usr/local/sbin run below command to verify your path Code:
for non-root user |
You can execute ifconfig as a user, if you provide the whole path
Code:
/sbin/ifconfig |
Code:
[root@localhost /]# echo $PATH |
Quote:
Quote:
if yes then you have to give full path of command. Code:
/sbin/ifconfig |
Code:
[shaun@localhost ~]$ echo $USER |
Quote:
if you want to become root just run su command as below Code:
$ su - Code:
echo $PATH |
Code:
[root@localhost shaun ~]# su - root That what you need now? I see :/sbin/: in the $PATH. So, shouldn't su then ifconfig be working? *tear* |
Quote:
Code:
# ifconfig |
almost....there.....
Code:
[shaun@localhost ~]$ ifconfig |
Quote:
login as non-root user. open your local profile Code:
$ vim .bash_profile Hope this help Best of luck. |
Quote:
|
All times are GMT -5. The time now is 05:50 AM. |