1

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
  • To see the value of $PATH (or any other variable), use echo $PATH. – nohillside Nov 25 '19 at 18:28
2

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.

  • It should already be there. My guess is that /sbin (and /usr/sbin) are being removed by something in a shell init file (~/.bash_profile, ~/.bashrc, or something like that). – Gordon Davisson Nov 25 '19 at 17:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .