commands.sh

sw_vers

macos

Print macOS operating system version information.

More info →

Examples (3)

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

Print only the version number of the operating system

sw_vers -productVersion

Print only the build identifier

sw_vers -buildVersion
made by @shridhargupta | data from tldr-pages