why I cannot use airport command in terminal?
-bash airport: command not found
MacBook Pro with Retina display, macOS 10.13.6
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.
Need help with Apple Developer tools and technologies? Want to share information with other developers and Apple engineers? Visit Developer Forums at Apple.
-bash airport: command not found
MacBook Pro with Retina display, macOS 10.13.6
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"
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"
Hello,
The command-line tool airport isn't in one of the normal locations that are searched for use in the command line. You will have to provide the full path:
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resource s/airport
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.
That path is to the executable itself, so you would either need to just add the containing folder to your PATH, use the alias, or use the entire path:
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -h
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
Thanks for you reply, and how can I provide the full path? I just cd in this path and run airport -s, then it still doesn't work. Or I should provide the path in .bash_profile.
I tried add this in the .bash_profile but the airport command also can not use. like this: -bash: airport: command not found
I add this path successfully, but I just still cannot use the airport command. Likes i use airport -s, the bash also show command not found.
Copying that command (the -h option just shows the help) into the Terminal doesn't work? Can you navigate that path and find the airport executable?
Yes, airport -h doesn’t work, and the path can find the execution. So maybe my system got some problems, I just reinstall it now.
Don't use just airport -h - does copying and pasting the entire command work?
/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -h
this one work
how can it work when I does not want to use the path?
I add airport="/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Reso urces" into .bash_profile and source .bash_profile. Then I still cannot use airport command.
Thanks, this solve my question.
why I cannot use airport command in terminal?