join id
Add the network with ESSID id to the join list. The interface will automatically attempt to connect to networks on this list if they are found during a scan.
The id can either be a printable ASCII string up to 32 characters in length, or a series of hexadecimal digits up to 64 digits preceded by “0x”. If id is the empty string ("") and none of the networks on the join list are found during a scan, the interface will automatically connect to any available networks, provided they do not require WEP or WPA authentication.
Apart from the id, the join list will record wpakey, wpaprotos, or nwkey parameters for the network, provided they are passed in the same invocation of ifconfig. Because multiple access points may exist in a given network, the mode (11a/11b/11g/11n), chan, and bssid parameters cannot be stored with join. However, they may be used separately to force the selection of a particular access point when the automatic access point selection turns out to be suboptimal.
join and nwid cannot be used together in the same invocation of ifconfig.