10.4: Get your Airport SSID from the commandline

Aug 26, '05 08:31:00AM

Contributed by: luomat

Tiger only hintI used to get my Airport network's SSID using this Terminal command:

$ ioreg -n AirPortPCI -S -w 0 | fgrep -i  ssid |\
 sed 's#.*" = "##; s#"##'
I found this in the comments to an older hint, but it no longer seems to work in 10.4.2 (although I thought it worked in 10.4.1 and/or 10.4.0). However, this still works:
$ system_profiler SPAirPortDataType |
awk -F": " '/Current Wireless Network/{print $2}'
[robg adds: The new command worked when I tested it in 10.4.2; I had no luck with the older version, either.]

Comments (11)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20050821180404652