macOS 查看系统详细信息

本文最后更新于:2024年9月8日 晚上

macOS 查看系统详细信息

  • system_profiler command – Show Apple hardware and software configuration.
  • sw_vers command – Show Mac OS X operating system version.
  • uname command – Show operating system name and more.

Determine OS X version from the command line

  • Open the terminal app and type the following command:
1
sw_vers
  • -productName – Print just the value of the ProductName property.

  • -productVersion – Print just the value of the ProductVersion property.

  • -buildVersion – Print just the value of the BuildVersion property.

system_profiler

  • You can use the system_profiler command as follows to get the same information:
1
system_profiler | less$ system_profiler SPSoftwareDataType

Using SystemVersion.plist file

  • The above commands use /System/Library/CoreServices/SystemVersion.plist file. One can print the version info as follows:$ cat /System/Library/CoreServices/SystemVersion.plist
1
ProductBuildVersion 15B42 ProductCopyright 1983-2015 Apple Inc. ProductName Mac OS X ProductUserVisibleVersion 10.11.1 ProductVersion 10.11.1
  • On Mac OS X server, try:$ cat /System/Library/CoreServices/ServerVersion.plist

How do I find out OS X Darwin kernel version?

  • Simply type the following uname command to see operating system name including the machine hardware name, the nodename, the machine processor architecture name, the operating system release, the operating system name, and the operating system version:
1
uname -av
  • Sample outputs:
1
Darwin Viveks-MacBook-Pro.local 15.0.0 Darwin Kernel Version 15.0.0: Sat Sep 19 15:53:46 PDT 2015; root:xnu-3247.10.11~1/RELEASE_X86_64 x86_64

本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!