Last active
November 16, 2019 21:04
-
-
Save danielgross/4f253f85e6c209e2ece0a604806eee13 to your computer and use it in GitHub Desktop.
OS X WiFi Shortcuts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment