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

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).


Stefan Durand

My name is Stefan, I'm the admin of LinuxScrew. I am a full-time Linux/Unix sysadmin, a hobby Python programmer, and a part-time blogger. I post useful guides, tips, and tutorials on common Linux and Programming issues. Feel free to reach out in the comment section.

2 thoughts on “FAQ: How to retreive hardware manufacturer name, serial numbers, etc. in Linux command line”

  1. 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!

Leave a Reply

Your email address will not be published. Required fields are marked *