Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
Take a look this – Achu May 14 '13 at 8:59
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
up vote 44 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
    Product Name: MS-7368

System Information
    Manufacturer: HP
    Product Name: ProLiant ML330 G6
share|improve this answer
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
Note: needs root. If you want all the info you have permissions for under the current user, use: cat /sys/devices/virtual/dmi/id/* (and it does allow you to get the model name and the sort using a normal user) – qwertzguy Jan 22 '15 at 4:58

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

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.


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


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

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 '14 at 15:36
Awesome! A solution that works for non-root! – qwertzguy Jan 22 '15 at 5:05
Note that this dmi information may only be applicable to Intel-based PCs. I have a network device that is driven by a Linux-based ARM computer, and neither dmicode or the path in /sys is available to it. – Mike S May 19 at 21:25


sudo dmidecode -s baseboard-product-name
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

Your Answer


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.