HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

sw_vers — Print macOS operating system version information. More information: <https://keith.github.io/xcode-m

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandoperatingcliprintversionsw_versmacossystem
macos

Problem

How to use the sw_vers command: Print macOS operating system version information. More information: <https://keith.github.io/xcode-man-pages/sw_vers.1.html>.

Solution

sw_vers — Print macOS operating system version information. More information: <https://keith.github.io/xcode-man-pages/sw_vers.1.html>.

Print all available information (OS name, version number, and build):
sw_vers


Print only the version number of the operating system:
sw_vers -productVersion


Print only the build identifier:
sw_vers -buildVersion

Code Snippets

Print all available information (OS name, version number, and build)

sw_vers

Print only the version number of the operating system

sw_vers -productVersion

Print only the build identifier

sw_vers -buildVersion

Context

tldr-pages: osx/sw_vers

Revisions (0)

No revisions yet.