How to show Mac OS version in terminal

sw_vers -productVersion
system_profiler SPSoftwareDataType