Get motherboard deviceID and BIOS serial in Linux
Well, i'm doing a Library (DLL) which lets you get the motherboard deviceID and BIOS Serial in Linux. I have other for Windows, but since i can't (Or i don't know) how to check if Operating System is Windows or Linux. But since i'm Window开发者_JAVA技巧s user, i don't have idea. So my question is, is possible to get Motherboard deviceID and BIOS serial in Linux? If it's possible, how?
You can find this information in the files in /sys/class/dmi/id
. These files are ordinary text files, simply open them and read. Note that not all motherboard BIOSes bother filling in these IDs, but for those mobos that do provide the data, it will be reported there.
精彩评论