Knowing which wireless networks a Mac has been connected to in the past be can be helpful for a variety of reasons, including network troubleshooting, determining where a Mac has been, if a specific wifi password is recoverable, and a myriad of other technical reasons. Searching for past networks is completely different from finding currently available networks, and you won’t recover historical data from the menu bar item or otherwise excellent Mac OS X wi-fi scanner tool.
We’ll cover two simple ways to find past wi-fi network connections on a Mac, the first is the easy route through System Preferences, and the second approach uses a lengthy command line string to read the wireless networks from a plist file.
Keep in mind these lists aren’t completely infallible and shouldn’t be considered forensic by any stretch, someone can manually add and remove entries from the preferred and remembered networks lists if they wanted to. Nonetheless, for the average use case troubleshooting scenario they should be adequate.
How to See Which Wi-Fi Networks a Mac has Connected To Before
If you’ve tweaked your preferred networks before, you’ll be familiar with this list:
- Open System Preferences from the Apple menu and choose “Network”
- Click the “Advanced” button and choose the “Wi-Fi” tab
- Look under the “Preferred Networks” list to find the list of previously connected wireless networks, it is scrollable
The UI approach is easy, but the same information can be retrieved from the command line as well.
How to List Previously Used Wi-Fi Networks on Mac from the Command Line
A wireless network history list can be retrieved by command line through the use of this lengthy string, be sure it is entered onto a single line:
In modern versions of Mac OS, like macOS Mojave, Catalina, Sierra, OS X El Capitan, and Yosemite, you can shorten the syntax considerably as so:
defaults read /Library/Preferences/SystemConfiguration/com.apple.airport.preferences |grep SSIDString
In prior versions of Mac OS X, you can opt for the same as the above command, or use the lengthier string below with heavy regex:
defaults read /Library/Preferences/SystemConfiguration/com.apple.airport.preferences RememberedNetworks | egrep -o '(SSID_STR|_timeStamp).+' | sed 's/^.*= (.*);$/1/' | sed 's/^"(.*)"$/1/' | sed 's/([0-9]{4}-..-..).*/1/'
You will see something like so as the output, with only the SSID of routers listed:
This-Router
linksys
CoffeeHouse
RouterFromDubiousLocationThatMacShouldntHaveBeenAt
Starbucks Cupertino
Ancient_Router_from_2007
The long command comes from CoderWall and though it may look strange, it’s required to get clean output. Entering the string without grep and sed will provide you with far more information than you are looking for in this case, as it it dumps out everything pertaining to past wi-fi connections that have become part of the “RememberedNetworks” list.
Prior wi-fi connection history is useful for many reasons, whether to figure out which routers you have used in the past for connectivity, troubleshooting, personal or private reasons, discovering connection history, or even for digital forensics purposes. You can use the command line method or the GUI method, whichever is easiest for you or most applicable for your use case scenario.
If you know of any other method or approach to listing prior wi-fi network connections on a Mac, share with us in the comments below!
Follow Me:
Top Best Sellers!!