Search

bash: ifconfig: command not found



This is a very common error which lot of us might have encountered for commands like ifconfig,insmod,modprobe etc.
The error does not mean that the system does not have the command, it just means that these commands are placed in the folder /sbin and only superusers are supposed to execute the commands in the folder /sbin.

All the other commands that we are allowed to execute with as normal users are placed in the folder /bin.
Thus to get around this error add sudo before the command. i.e.



Note that adding sudo will only work if the user has the permission to execute sudo i.e. has the admin rights.

3 comments:

  1. Replies
    1. Yes that will also solve the problem.
      But it is sometimes safer to let only root or admin users to have access to the network related information. Guess that is why the command has been put under sbin.

      Delete

Follow by Email