Skip to content

Instantly share code, notes, and snippets.

@1solation
Created February 1, 2024 12:50
Show Gist options
  • Save 1solation/55f0e2c90146db5c198358eb93e36855 to your computer and use it in GitHub Desktop.
Save 1solation/55f0e2c90146db5c198358eb93e36855 to your computer and use it in GitHub Desktop.
reorder preferred wifi networks mac OS

networksetup -listpreferredwirelessnetworks en0

find your wifi network you want to change

Preferred networks on en0:
	Banana
	CafeWifi
	MyPhoneHotspot

Remove the network first with

networksetup -removepreferredwirelessnetwork en0 WiFiName

Then add it back with a higher index value (index starts at 0)

networksetup -addpreferredwirelessnetworkatindex en0 MyPhoneHotspot 0 WPA3

You can check if it should be WPA2 or WPA3 by going into your system settings > wifi > advanced

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment