FAQ: How to retreive hardware manufacturer name, serial numbers, etc. in Linux command line

Welcome to Linux Screw! If you're new here, you may want to subscribe our RSS feed.

ibm serial numberQuestion: How can I get information about hardware manufacturer, model name, serial number, BIOS information using Linux command line (CLI)?

Answer: You are welcome to use dmidecode which helps to get information about your system’s hardware as described in your system BIOS. That information typically includes system manufacturer, model name, serial number, BIOS version, asset tag as well as a lot of other details depending on the manufacturer.

Beware that DMI data have proven to be too unreliable to be blindly trusted. Dmidecode does not scan your hardware, it only reports what the BIOS told it to. Dmidecode was first written by Alan Cox and is now being further developed and maintained by Jean Delvare. It is released under the General Public License (GPL).

This tool can be easily downloaded from here (source code) or can be installed as binary package included into repositories of many distributions like Debian, Ubuntu, Gentoo. FreeBSD version is also available. Actualy it is reported that dmidecode works well on the following systems:

  • Linux i386
  • Linux x86_64
  • Linux ia64
  • FreeBSD i386
  • FreeBSD x86_64
  • NetBSD i386
  • OpenBSD i386
  • BeOS i386
  • Cygwin i386
  • Solaris x86 (CVS version)

In Ubuntu (my favourite distro) just execute the following: sudo aptitude install dmidecode (sample output is here).

Share This
 
 
» You might also be interested in the following articles:
Ubuntu Linux goes!
Why and how to migrate to ext4
Bash shell FAQ
Comparing Bash with… Windows command line shell…
Print files in reverse with coreutils 'tac' and 'rev' commands



» Want to stay up to date? Subscribe to our E-MAIL or RSS feed!


4 Responses to “FAQ: How to retreive hardware manufacturer name, serial numbers, etc. in Linux command line”


  1. 1 shirteesdotnet

    Sounds interesting. Ive only been running Ubuntu for about 8 months now… can move around pretty good, but at first couldnt figure out how to run this. I installed it fine in the terminal, and then typed "dmidecode" in the terminal to run it but get this error:

    dmidecode 2.9
    /dev/mem: Permission Denied

    I then did "gksudo dmidecode" and it worked fine.

  2. 2 confiq

    you should use "sudo" instead of "gksudo".
    gksudo is to ask you in GUI for password, but if you're in terminal without X you can't use that command!

  3. 3 artiomix

    Thank you, confiq, that’s what I wanna say :)

  4. 4 mysurface

    lshw does provide quite informative hardware info too, and can generate html format.

    http://linux.byexamples.com/archives/340/how-to-generate-system-hardware-profile-for-your-laptop/
    But recently lshw seems to acting up :(

Leave a Reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word




Friendly Sites:Who is behind Linux Screw?
Aspiring Sysadmin | GeekyBits³ | Bash Cures Cancer | TOTMS
Linux Operating System | Small Linux Deployments | My SysAd Blog
The Danesh Project | ZEPY | LinuxHaxor.net | Planet Sysadmin
The Sys Admin | {buhay sysad} | a non-geek's linux notes
CyberCapital.Org | G-LOADED! | The Linux Alternative Project
My name is Artem Nosulchik (artiomix AT gmail DOT com) and I'm Linux/Unix, Cisco systems engineer. The main idea of Linux Screw is to share relevant knowledge, skills and observations over The Web. Here you can find a lot of information related to different Linux distributions, FreeBSD, IOS as well as a other Open Source around staff. Read more ››