macos:version:show
Displays the current macOS version
$ sw_vers -productVersion
try on your machine
The command "sw_vers -productVersion" is used in macOS to display the version of the operating system installed on a Mac computer. When you execute this command in the terminal, it will return the version number of the macOS that is currently running.
For instance, if you run the command and the output is "10.15.7", it means the Mac is running macOS Catalina version 10.15.7.
The "sw_vers" part of the command refers to the "Software Version" tool, which is a system utility that provides information about the macOS.
The "-productVersion" option is used to specifically request the product version of the operating system, which is the essential information you would need to determine the installed macOS version.
This explanation was created by an AI. In most cases those are correct. But please always be careful and
never run a command you are not sure if it is safe.