Find your Mac’s Serial number from CLI


Okay couple of quick ways to find the serial number of your mac.
ioreg -l|grep IOPlatformSerialNumber|awk '{print $4}'|cut -d \" -f 2
or
ioreg -l | awk '/IOPlatformSerialNumber/ {print $4}' | sed 's/\"//g'
Very useful when you’re logged into your Mac remotely and call apple helpdesk with a issue.

, ,

4 responses to “Find your Mac’s Serial number from CLI”

  1. Sorry for the newbish question. But what would you use this for?

  2. Hi Teo,

    You usually need it if you’re phoning for hardware support from apple. This helps since you don’t have to get up and go to the console just to lookup the serial number of the machine. You can just use ssh, connect to the server, issue the command and get the serial number.

    Some software companies also require you to give them the serial number of the machine when you phone then for licensing issues (ie: the software is nodelocked to the machines serial number).

    Hope this helps….
    TTYL,
    Many

Leave a Reply