1

I am trying to find the serial number on my Mac through terminal, but am getting the error seen in the image below. If anyone can help me, that would be great, but I understand if you've never seen this error, as I never have. I am connecting to the Mac via Reflection (the ssh app).

Last login: Tue Oct 25 17:08:24 2016 from 192.168.10.100
$ system_profiler |grep "Serial Number (system)"
2016-10-25 17:11:37.247 system_profiler[37298:1384741] There was an error parsing the Info.plist for the bundle at URL <0x7fb91414ce10>: NSCocoaErrorDomain - 3840 
$ 
  • 1
    Do not post an image of a Terminal window when you can simply copy and paste the contents of the Terminal window, as it's a totally unnecessary waste of bandwidth! – user3439894 Oct 26 '16 at 17:45
4

Have you tried looking at the I/O Kit Registry?

Here is a link to the man page for ioreg provided by apple.

Try this command to reveal the system's serial number:

ioreg -l | grep IOPlatformSerialNumber
-2

This prints just the serial number without the rest of the formatting.

ioreg -l | awk '/IOPlatformSerialNumber/ { split($0, line, "\""); printf("%s\n", line[4]); }'
  • 2
    KISS: ioreg -l | awk -F'"' '/IOPlatformSerialNumber/{print $4}' – user3439894 Jan 11 '18 at 5:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .