Macos – Open “About This Mac” from Terminal

applescriptmacmacosterminal

This probably seems totally useless to most, but i've got a specific need to open the "About This Mac" dialog from within Terminal. Any idea if its possible?

I suppose AppleScript might be the way to – what I need to do is for quality control purposes take a photo of the Mac booted into its desktop and the About This Mac screen includes its spec and serial number for proof. I suppose for a total hands off way of doing this, opening it, screenshotting it and then sending e-mail the screenshot or sending to Dropbox etc would probably be idea – I guess a screenshot is just as good as a photo with my iPhone.

Any input into either method would be excellent.

Best Answer

You can also run:

~ system_profiler > my_profile

To dump much of the same information to a more parseable file called my_profile.

If you simply want the system's serial number (that could be sent however you want really), you could use:

~ system_profiler SPHardwareDataType | awk '/Serial/ {print $4}'

If you are hoping for a screenshot of About this Mac for proof of a running desktop maybe this is better:

~ screencapture -l \
$(osascript -e 'tell app "System Information" to id of window 1') \
system_information.png
Related Question