Question

Ok, so I think the title of this question pretty much sums it up.

I would to know of a way to obtain the serial number of the HDD that the operating system is installed on, in OSx without having Admin privileges. Preferably, I would like to do this using Terminal because I need to use the serial in my Java application and I doubt Java has the capabilities to obtain the information itself.

Thanks in advance

Was it helpful?

Solution

/usr/sbin/diskutil info / | /usr/bin/awk '$0 ~ /UUID/ { print $3 }'

That should give you the serial of the drive mounted at root.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top