![]() |
How to tell OS X version from CLI?
Hi, Does anyone know how to tell the version of OS X via the command line? Is it possible to cat a file and the contents will tell you the version? (i.e. 10.1, 10.2, 10.3)
Thanks, jules |
Well, I don't have 10.0, 10.1, 10.2, or 10.3 handy here to check but there are some possibilities:
/System/Library/CoreServices/SystemVersion.plist sw_vers has some good reporting, but I _think_ it was added with Panther. |
Quote:
-- Rob |
Code:
$ sw_vers |
Well, I checked some systems:
10.2.0 has sw_vers. 10.1.0 has sw_vers. 10.0 has sw_vers. The result of the command looks the same on 10.1, 10.2 and 10.3 so it can be parsed or passed command-line options for getting the version of the OS. |
| All times are GMT -5. The time now is 05:34 PM. |
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.