Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I used a system information utility to take the model number of a system, and also of the motherboard.

DMI System Manufacturer     LENOVO
DMI System Product          2306CTO
DMI System Version          ThinkPad X230
DMI Motherboard Product     2306CTO  

Is there a way to get model number, in this case 2306CTO, in Linux?

share|improve this question
2  
Take a look this –  Achu May 14 '13 at 8:59
2  
For clarity it seems you're interested in hardware product, not specifically the motherboard. For example, "ThinkPad X230" is a type of computer not motherboard. –  Bratchley May 14 '13 at 10:45

5 Answers 5

up vote 8 down vote accepted

using the dmidecode | grep -A3 '^System Information' command. There you'll find all information from BIOS and hardware. These are examples on three different machines (this is an excerpt of the complete output):

System Information
    Manufacturer: Dell Inc.
    Product Name: Precision M4700

System Information
    Manufacturer: MICRO-STAR INTERANTIONAL CO.,LTD
    Product Name: MS-7368

System Information
    Manufacturer: HP
    Product Name: ProLiant ML330 G6
share|improve this answer
2  
FWIW, it's probably better to get in the habit of filtering for particular DMI types rather than using grep. For overall hardware model that would be dmidecode -t1. That way you have a simplistic way of pulling data out of dmidecode and just need to remember common DMI types. Habit becomes really useful when examining RAM installs (dmidecode -t17) when grep can make some really ugly output if you key off the wrong data. Plus, the output of -t is more complete –  Bratchley May 14 '13 at 10:49
    
@JoelDavis, I was not aware of those options before. I will use them. Thanks. –  eppesuig May 14 '13 at 12:30

Try:

sudo dmidecode -s baseboard-product-name
share|improve this answer

Try sudo dmidecode -t baseboard for full information on the DMI table contents relevant to your baseboard, in a human readable form. For just the System Product, you can use either:

sudo dmidecode -s system-product
sudo dmidecode -s baseboard-product-name

Other relevant options for motherboard info are

sudo dmidecode -s system-version
sudo dmidecode -s baseboard-version
sudo dmidecode -s system-manufacturer
sudo dmidecode -s baseboard-manufacturer

Try sudo dmidecode -s for a full list of system DMI strings available.

share|improve this answer
#dmidecode |grep Base Board Information

sometimes give you correct information.

dmidecode is a tool for dumping a computer's DMI (some say SMBIOS) table contents in a human-readable format. This table contains a description of the system's hardware components, as well as other useful pieces of information such as serial numbers and BIOS revision. Thanks to this table, you can retrieve this information without having to probe for the actual hardware. While this is a good point in terms of report speed and safeness, this also makes the presented information possibly unreliable.

share|improve this answer

For the record, much of this information is available under /sys/devices/virtual/dmi/id on modern Linuces (ie, since at least 2011), and much if it- notably, not including serial numbers- is readable by regular users. To answer the original poster's question, product_name is the file that contains the system's model name.

bios_date
bios_vendor
bios_version
board_asset_tag
board_name
board_serial
board_vendor
board_version
chassis_asset_tag
chassis_serial
chassis_type
chassis_vendor
chassis_version
modalias
power
product_name
product_serial
product_uuid
product_version
smbios_version
subsystem
sys_vendor
uevent

And here would be a handy-dandy script that any user could run, to display the goodness:

#!/bin/bash

cd /sys/devices/virtual/dmi/id/
for f in *; do
        printf "$f "
        cat $f 2>/dev/null || echo "***_Unavailable_***"
done

No filenames have spaces in them, so this information is easily manipulated by utilities such as awk, for your own nefarious purposes!

share|improve this answer
    
Great, that's great with linux-based most of the if you don't find a tool the stuff you need (OS, hardware info) is somewhere in /sys or /proc. Thanks –  Eduard Florinescu Dec 9 at 15:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.