Determine MacOS version from Terminal (CLI)
As you may or may not know the way most people determine what version of MAcOS they are running is by clicking on the Apple Menu in the upper left hand corner of the screen and selecting About this Mac. You will see a popup dialog that looks something like this.
If you would like a geekier and possibly faster way to determine this you can launch Terminal by either using Spotlight Search (Click the magnifying class (🔍) in your Mac’s Menu Bar or use the hand keyboard shortcut of ⌘(Command)+Space. Once the appliation finsihes launching you will see a window that looks something like this:
There are two commands you can now run that will display your MacOS version:
#Simple Output:
gatewayy@Swordfish-II ~ sw_vers -productVersion
15.0
#More detailed Output:
gatewayy@Swordfish-II ~ system_profiler SPSoftwareDataType
Software:
System Software Overview:
System Version: macOS 15.0 (24A5264n)
Kernel Version: Darwin 24.0.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Computer Name: Swordfish II
User Name: Brett Elliff (gatewayy)
Secure Virtual Memory: Enabled
System Integrity Protection: Enabled
Time since boot: 1 day, 17 hours, 29 minutes
I keep having to search for this, so I thought I might as well put this down so others can benefit from the knowledge. If you have any questions, thoughts, etc. you can reach me via my Contact page or feel free to DM me on Mastodon.
Via: SuperUser