 |
 |
Finding out OS X version from the terminal
|
 |
|
 |
|
Grizzled Veteran
Join Date: Apr 2001
Status:
Offline
|
|
How can I find out the OS X version, including possibly the build number from the terminal? I know in 10.3, system_profiler can be used, but I don't think this existed in 10.0-10.2.
Thanks
|
|
<This space under renovation>
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Apr 1999
Location: Copenhagen, Denmark
Status:
Offline
|
|
more /System/Library/CoreServices/SystemVersion.plist
|
|
JLL
- My opinions may have changed, but not the fact that I am right.
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Apr 2001
Location: Long Beach, CA
Status:
Offline
|
|
defaults read loginwindow SystemVersionStampAsString
defaults read loginwindow BuildVersionStampAsString
or you can just
defaults read loginwindow
|

ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
|
| |
|
|
|
 |
|
 |
|
Senior User
Join Date: Jan 2002
Location: NYC
Status:
Offline
|
|
|
|
|
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Apr 2001
Status:
Offline
|
|
Originally posted by K++:
Or good old hostinfo.
Hostinfo only shows the Darwin version, not the overall OS X version.
|
|
<This space under renovation>
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Apr 2001
Location: Long Beach, CA
Status:
Offline
|
|
Originally posted by Drakino:
Hostinfo only shows the Darwin version, not the overall OS X version.
You can, however, get a pretty good idea of what version of OS X is running based on that Darwin version. Subtract four from the first number and you have it!
Darwin 6.8 would be [10.]2.8
Darwin 7.0 would be [10.]3.0
Darwin 6.3 would be [10.]2.3
Darwin 5.5 would be [10.]1.5
The reason it isn't perfect is because the kernel isn't always updated. It wasn't updated with 10.3.1, so it still says Darwin 7.0.0.
|

ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2001
Location: Chico, CA and Carlsbad, CA.
Status:
Offline
|
|
w00t:
Code:
[aorth@Alan-Orths-Computer: ~]$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.3.1
BuildVersion: 7C107
|
"In Nomine Patris, Et Fili, Et Spiritus Sancti"
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Apr 2001
Location: Long Beach, CA
Status:
Offline
|
|
Originally posted by [APi]TheMan:
w00t:
Code:
[aorth@Alan-Orths-Computer: ~]$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.3.1
BuildVersion: 7C107
Just goes to show: there's always another way to do it in Unix.
|

ACSA 10.4/10.3, ACTC 10.3, ACHDS 10.3
|
| |
|
|
|
 |
|
 |
|
Grizzled Veteran
Join Date: Apr 2001
Status:
Offline
|
|
Originally posted by Detrius:
You can, however, get a pretty good idea of what version of OS X is running based on that Darwin version. Subtract four from the first number and you have it!
Reason I want to avoid trying to translate Darwin numbers is two fold:
1. The script would have to be updated if a new version came out.
2. It might not be OS X, since Darwin is a standalone OS, even for x86.
I'm tweaking an existing XChat sysinfo script to work better with OS X. I have it pulling laptop battery info already, and some other changes.
|
|
<This space under renovation>
|
| |
|
|
|
 |
|
 |
|
Junior Member
Join Date: Nov 2003
Status:
Offline
|
|
Originally posted by Detrius:
defaults read loginwindow SystemVersionStampAsString
defaults read loginwindow BuildVersionStampAsString
we have a winner
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|