tinyapps.org / blog


OS X: Get OS version info in Terminal #

$ sw_vers
ProductName:    Mac OS X
ProductVersion: 10.6.4
BuildVersion:   10F569
$ sw_vers -productVersion
10.6.4
Especially handy when resetting a password in single user mode, since the method varies based on which version of OS X is running.

UPDATE 1:

Here's another way to check; great for use on offline OS X installs:
$ grep -2 ProductVersion /Volumes/OfflineVolumeName/System/Library/CoreServices/SystemVersion.plist
	<key>ProductUserVisibleVersion</key>
	<string>10.11.6</string>
	<key>ProductVersion</key>
	<string>10.11.6</string>

UPDATE 2:

/mac | Aug 14, 2010


Subscribe or visit the archives