Manage the Apple AirPort interface.

      /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport  options

The airport command is not in the system path by default, but you can create a symbolic link in /usr/local/bin:
$ sudo mkdir -p /usr/local/bin
$ sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/local/bin/airport

      --channel=[arg]  Set arbitrary channel on the card.

      --disassociate   Disassociate from any network.

      --getinfo        Print current wireless status, e.g. signal info, BSSID, port type etc.

      --scan=[arg]     Perform a wireless broadcast scan.
                       Will perform a directed scan if the optional arg is provided.
      --xml            Print info as XML

      --psk            Create PSK from specified pass phrase and SSID.
                       The following additional arguments must be specified with this command:
                         --password=arg  Specify a WPA password.
                         --ssid=arg      Specify SSID when creating a PSK.
      --help           Show this help.


Print the current wireless status:

$ airport -i

Print the full help for airport:

$ airport -h

“Rumack: Can you fly this plane, and land it?
Ted Striker: Surely you can't be serious.
Rumack: I am serious... and don't call me Shirley” ~ Airplane the movie

Related macOS commands

Local man page: airport - Command line help page on your local machine.
ifconfig - Configure network interface parameters.

Copyright © 1999-2024
Some rights reserved