Finding extensive wi-fi connection history in Mac OS XFinding extensive wi-fi connection history in Mac OS X

There are some situations where knowing exactly what wireless networks a Mac has connected to and when that connection was last established can be helpful.

We’ll demonstrate how to uncover a comprehensive listing of specifics about previously joined wi-fi networks on a Mac, which will include the last connection date and time (to the second!), if the network is hidden or not, the network SSID number, the networks SSID broadcast name, and the security type of each wifi network.

This will use the command line of Mac OS X, which is obviously a bit more advanced and perhaps not applicable to average Mac users. Nonetheless, the retrieved information can be helpful for a wide variety of purposes. You’ll find the data useful for something as simple as recovering a forgotten a wi-fi network password from a router which you can’t quite remember the name of, to network troubleshooting and diagnostics, or even for data analysis and forensic purposes.

How to See Wi-Fi Network Connection History on a Mac

Launch the Terminal application, located in /Applications/Utilities/ (or with Spotlight and Command+Spacebar) and enter the following command string into a single line:

For modern versions of Mac OS and Mac OS X, including MacOS High Sierra, Sierra, El capitan, OS X Yosemite, and newer, use the following:

defaults read /Library/Preferences/SystemConfiguration/com.apple.airport.preferences |grep LastConnected -A 7

For earlier versions of Mac OS X including Mavericks and prior releases, you can use the following command to clean up the output and match that which is available in modern releases:

defaults read /Library/Preferences/SystemConfiguration/com.apple.airport.preferences| sed 's|./|`pwd`/|g' | sed 's|.plist||g'|grep 'LastConnected' -A 7

Hit return and you’ll instantly see the comprehensive listing of wireless network connection details.

Here’s an example of output supplied by this command string, showing three connected networks.

$ defaults read /Library/Preferences/SystemConfiguration/com.apple.airport.preferences |grep LastConnected -A 7
LastConnected = "2015-05-29 09:14:48 +0000";
Passpoint = 0;
PossiblyHiddenNetwork = 0;
RoamingProfileType = Single;
SPRoaming = 0;
SSID = ;
SSIDString = "HomeWirelessWAN-ng";
SecurityType = "WPA/WPA2 Personal";
--
LastConnected = "2015-05-31 01:52:43 +0000";
Passpoint = 0;
PossiblyHiddenNetwork = 1;
RoamingProfileType = Single;
SPRoaming = 0;
SSID = ;
SSIDString = "Secret Network 1";
SecurityType = "WPA2 Personal";
--
LastConnected = "2015-06-03 08:32:12 +0000";
Passpoint = 0;
PossiblyHiddenNetwork = 0;
RoamingProfileType = Single;
SPRoaming = 0;
SSID = ;
SSIDString = "Public Network - Parks 1";
SecurityType = "None";

Keep in mind if you run this command on a Mac that has joined many wireless routers, you’ll find a very lengthy list returned, which may be better read if redirected into a text file by appending “> ~/Desktop/connectionlist.txt” to the end of the syntax like so:

defaults read /Library/Preferences/SystemConfiguration/com.apple.airport.preferences |grep LastConnected -A 7 > ~/Desktop/connectionlist.txt

If you use that command, a file named ‘connectionlist.txt’ will appear on the current users OS X desktop with the pertinent information.

Retrieve detailed wireless connection history details from Mac OS X command lineRetrieve detailed wireless connection history details from Mac OS X command line

Regular readers here may recall that we have shown a few ways to find which wi-fi networks a Mac has connected to before, but those methods in comparison provide notably less information, certainly compared to the extensive details offered here. You can use whichever is most relevant to your needs.

Do you know of another way to track wi-fi connection history on a Mac? Let us know in the comments!

Source

Follow Me:
Top Best Sellers!!