I have a severe problem today: when I type ifconfig
it does not show ip configuration on ubuntu 12.04. Can anyone help me on this?
Here is the result of ifconfig
:
Command 'ifconfig' is available in '/sbin/ifconfig'
The command could not be located because '/sbin' is not included in the PATH environment variable.
This is most likely caused by the lack of administrative privileges associated with your user account.
ifconfig: command not found
You can do either of the following:
Open your
~/.bashrc
file and write the following to the end:and then do
source ~/.bashrc
or open a new terminal instance.or open your
/etc/environment
and add/sbin
to end of thePATH
variable, so that is as follows:Add
/sbin
to the system path by running,If you follow @nux's answer, you have to create symbolic links for all the command files which are presented inside
/sbin
directory.But if you follow this or @jobin's answer, you don't need to go for that.You'll need to add
/sbin
to your path environment variableCreate a new file in
/etc/profile.d/custom-envs.sh
(file must ends with .sh)set the following file content:
Add execute permissions
To apply changes, you'll need to logout and login again
Try this command :