Developer Forums relocated!

Need help with Apple Developer tools and technologies? Want to share information with other developers and Apple engineers? Visit Developer Forums at Apple.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

why I cannot use airport command in terminal?

-bash airport: command not found

MacBook Pro with Retina display, macOS 10.13.6

Posted on Sep 2, 2018 5:47 PM

Reply
Question marked as Best reply

Posted on Sep 3, 2018 9:08 PM

if you are going to use an alias, you need to use the full path to the executable - as mentioned earlier, there was an extra space that shouldn't have been there, so it would be:


alias airport="/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport"
15 replies

Sep 3, 2018 2:19 PM in response to ARedBeginner

First you will probably have to fix the extra space that the forum software seems to have inserted. There are no spaces in that that. You can just type the whole thing. If you want, you could add something like this in .bash_profile:


alias airport="/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resource s/airport"


Sorry, when I go to edit the above, there is no space. I can't fix it. There shouldn't be a space there.

Sep 3, 2018 8:05 PM in response to ARedBeginner

When that full path works but your shortcuts don't, that indicates that the issue is either with the PATH or alias in your profile. Whichever one you are using, check that the alias is set to the full path to the executable (without that extra space), or that your PATH variable includes just the containing folder (without that extra space):


/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources

why I cannot use airport command in terminal?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.