Print the macOS Operating System version.
Syntax
sw_vers
sw_vers -productName
sw_vers -productVersion
sw_vers -productVersionExtra
sw_vers -buildVersion
Key
-productName Print just the name of the operating system release (typically "macOS").
-productVersion Print just the Product Version for example, "11.3" or "12.0".
-productVersionExtra
Print only the Rapid Security Response version, if one is installed on
the OS, for example, "(a)" or "(b)".
-buildVersion Print just the specific revision of the OS as generated by the macOS build system.
When executed with no options sw_vers prints a short list of version properties.
Major versions of macOS are released once a year, and are usually maintained for three years.
macOS Release Notes26 Tahoe 2025 last intel support 15 Sequoia 2024 14 Sonoma 2023 13 Ventura 2022 12 Monterey 2021 11 Big Sur 2020 (may appear as 10.16) 10.15 Catalina 2019 10.14 Mojave 2018 last 32-bit support 10.13 High Sierra 2017 10.12 Sierra 2016 Renamed as macOS 10.11 El Capitan 2015 10.10 Yosemite 2014 10.9 Mavericks 2013 10.8 MountainLion 2012 10.7 Lion 2011 10.6 SnowLeopard 2009 10.5 Leopard 2007 10.4 Tiger 2005 first 64-bit support 10.3 Panther 2003 10.2 Jaguar 2002 10.1 Puma 2001 10.0 Cheetah 2001 First version of OS X
% sw_vers
ProductName: macOS
ProductVersion: 15.6.1
BuildVersion: 24G90
$ sw_vers -productVersion
15.6.1
“Have no friends not equal to yourself” ~ Confucious (Analects)
Local man page: sw_vers - Command line help page on your local machine.
system_profiler SPSoftwareDataType
set - Set a shell variable = value
softwareupdate - Check for new and updated software or Download a full macOS installer.
MIST - macOS Installer Super Tool.
How-to:Make a bootable macOS drive
How-to: macOS versions.
uname - Print the Darwin OS Kernel version / release / machine name.
unset - Remove variable or function names.