Mac – My ifconfig: command not found for some reason

bashmacterminal

I'm using Mac Sierra version 10.13.6 and when I try using ifconfig it just outputs

-bash: ifconfig: command not found

And, when I run $PATH, I get:

-bash: /usr/local/bin:/Library/Frameworks/Python.framework/Versions/3.7/bin:/Users/********/google-cloud-sdk/bin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Users/**********/google-cloud-sdk:/usr/bin:/bin: No such file or directory

Best Answer

The ifconfig binary is located in /sbin/ which doesn't seem to be in your $PATH.

You can add it by appending the line /sbin to /etc/paths.