Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
share|improve this question
Do you have superuser privileges? – i08in Mar 12 '14 at 8:37
Jobin i have super user priveleges. – Farooq Mar 12 '14 at 8:59
What is the output of echo $PATH? – Braiam Mar 12 '14 at 16:45
up vote -5 down vote accepted

Try this command :

sudo ln -s /sbin/ifconfig /usr/bin/ifconfig
share|improve this answer
This isn't a solution, its a workaround. – i08in Mar 12 '14 at 9:21

You can do either of the following:

  • Open your ~/.bashrc file and write the following to the end:

    export PATH=$PATH:/sbin

and then do source ~/.bashrc or open a new terminal instance.

  • or open your /etc/environment and add /sbin to end of the PATH variable, so that is as follows:

share|improve this answer

Add /sbin to the system path by running,

export PATH=$PATH:/sbin

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.

share|improve this answer
You don't need to source when you export on the terminal. – i08in Mar 12 '14 at 9:21

If you want to add /sbin to PATH system-wide and permanently, you should to:

  1. create new executable file in /etc/profile.d;
  2. write export PATH=$PATH:/sbin into created file;
  3. run source /etc/profile.

Now you get correctly PATH regardless reboots or changing user.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.