[Mac OS X] 如何在終端檢視 Mac OS 版本資訊
本文轉載至:https://www.cyberciti.biz/faq/mac-osx-find-tell-operating-system-version-from-bash-prompt/
use ssh client to login into my Mac Min server without GUI. How can I tell what version of Mac OS X operating system am I using command prompt? How do I find out Mac OS X version from Terminal app bash shell?
On Apple Mac OS X you need to use the following command to find out operating system version:
- 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:$
sw_vers
Sample outputs:
Where, you can pass the following options:
- -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.
Say hello to system_profiler
You can use the system_profiler command as follows to get the same information:$
system_profiler | less
$ system_profiler SPSoftwareDataType
Sample outputs:
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
Sample outputs:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>ProductBuildVersion</key> <string>15B42</string> <key>ProductCopyright</key> <string>1983-2015 Apple Inc.</string> <key>ProductName</key> <string>Mac OS X</string> <key>ProductUserVisibleVersion</key> <string>10.11.1</string> <key>ProductVersion</key> <string>10.11.1</string> </dict> </plist> |
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:$
uname -av
Sample outputs:
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
Tip: Read OS X version in audio format
Type the following bash command to hear OS X version using the say command on OS X:
say $(sw_vers) say $(sw_vers -productName && sw_vers -productVersion | sed 's/10//') |
相關文章
- Mac OS XMac
- mac os x10.9.2 檢視程式對應埠Mac
- windows遠端MAC OSWindowsMac
- Maven Install on Mac OS XMavenMac
- Vmware玩mac os x分享Mac
- 如何在MAC OS X上建立LINUX啟動盤MacLinux
- Mac OS X 清除DNS快取MacDNS快取
- Mac OS X下如何使用OpenGLMac
- Mac OS X 背後的故事Mac
- 如何在PC上安裝Mac OSMac
- Mac OS X 10.6.8下安裝Oracle客戶端MacOracle客戶端
- MAC OS X下建立iso檔案Mac
- Mac OS X 下搭建thrift環境Mac
- mac os x 啟用apache 和 phpMacApachePHP
- Mac OS X 上用 otool 代替 lddMac
- Mac OS X常用軟體介紹Mac
- MAC OS PHPMacPHP
- Windows下虛擬機器安裝Mac OS X ----- VM12安裝Mac OS X 10.11Windows虛擬機Mac
- Mac OS X中MacPorts安裝和使用Mac
- MAC OS X系統目錄結構Mac
- 提高 Mac OS X 速度的 52 個方法Mac
- 在Mac OS X中配置Apache + PHP + MySQLMacApachePHPMySql
- Mac OS X is not supported with software virtualization解決方法Mac
- Mac OS X 10.2 快速關機(轉)Mac
- Mac OS X 10.2 的按鍵(轉)Mac
- Mac os x 10.4.8終於在我的pc上安裝成功Mac
- solaris下檢視OS版本及Patch列表
- mac os 快捷鍵Mac
- 使用常見的網路命令檢視當前網路狀態——Mac OS X篇Mac
- Mac OS X下實現矩形部分圓角Mac
- Hammerspoon for Mac - OS X桌面自動化神器Mac
- Mac OS X 顯示和隱藏檔案Mac
- 如何修復Mac OS X和bootcamp分割槽Macboot
- Mac OS X 驚現最危險木馬Mac
- mac OS X下配置jdk環境變數MacJDK變數
- Mac OS X 10.9.3 Beta 8升級教程Mac
- Mac OS X 10.2 列印點點通(轉)Mac
- mac os x EnvironmentError: mysql_config not foundMacErrorMySql