Serial Number from Terminal

command lineserial numbersshsystem-profilerterminal

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 
$ 

Best Answer

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