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
Related posts:
Ubuntu Linux goes!
Why and how to migrate to ext4
Bash shell FAQ
Print files in reverse with coreutils 'tac' and 'rev' commands
Ping range of IP addresses in parallel with fping
 
 
 
Your Ad Here


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