Monday, June 23, 2014

Motherboard/BIOS make and model in Linux

Forgotten what motherboard is in the server that's furthest in in the closet? No worries, you can check it from the console in Linux with this simple command.
[ -f /usr/sbin/dmidecode ] && sudo -v && echo -n "Motherboard" && sudo /usr/sbin/dmidecode -t 1 | grep "Manufacturer\|Product Name\|Serial Number" | tr -d "\t" | sed "s/Manufacturer//" && echo -ne "\nBIOS" && sudo /usr/sbin/dmidecode -t 0 | grep "Vendor\|Version\|Release" | tr -d "\t" | sed "s/Vendor//"
This will produce something like this
Motherboard: System manufacturer
Product Name: P5Q-E
Serial Number: System Serial Number

BIOS: American Megatrends Inc.
Version: 2101
Release Date: 04/06/2009
As you can see all information is not always available but hopefully the product name is there at least. This should be all you need to find information about the motherboard.

Source