Comment by godelski

2 years ago

Makes sense. I'm mostly a Linux person myself, but strongly prefer a Mac laptop over a Windows laptop.

And for those that just want SSID, try either of these

  ipconfig getsummary en0 | grep -e '[^B]SSID' | cut -d " " -f5
  ipconfig getsummary en0 | grep -e '[^B]SSID' | sed -E 's/^.*: (.*)/\1/g'

Second will be better if your SSID has a space in it for some reason. You'll also be able to grab the domain name if you want it for similar reasons.