# Add this to your bash_profile. # Type `wifi` to list all WiFi networks. # Type `wifi` "SSID_NAME" "PASSWORD" to connect to one. # To tether: # 1. Update tether() with your iPhone SSID and hotspot password. # 2. Open Control Center. # 3. Long-press (force touch) Bluetooth. # 4. Turn OFF Wifi and turn ON "Personal Hotspot". It should read "Discoverable". # 5. Don't leave that screen or state. # 6. Type `tether` to pair with your iOS device. function wifi() { if [ -z "$1" ] then /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -s else networksetup -setairportnetwork en0 "$@" fi } function tether() { wifi YOUR_IPHONE_SSID IPHONE_PASSWORD }