Linux list hardware information

by on November 5, 2007 · 17 comments· last updated at April 10, 2008

Q. How do I get detailed information about my Linux server hardware information?

A. You need to use tool called lshw to extract detailed information on the hardware configuration of the machine. It can report exact memory configuration, firmware version, main board configuration, CPU version and speed, cache configuration, bus speed, etc. on DMI-capable x86 or IA-64 systems and on some PowerPC machines.

It currently supports DMI (x86 and IA-64 only), OpenFirmware device tree (PowerPC only), PCI/AGP, CPUID (x86), IDE/ATA/ATAPI, PCMCIA (only tested on x86), SCSI and USB.

List hardware

Type the lshw at a shell prompt:
$ lshw



You should follow me on twitter here or grab rss feed to keep track of new changes.

Featured Articles:

{ 17 comments… read them below or add one }

1 miljan November 9, 2007 at 7:47 am

Similar result can be produced with command ‘dmidecode’. But the output is not so nicely formated as with lshw. :)

Reply

2 Anil November 10, 2007 at 2:39 pm

Is this same as lshal .. I am using that and I couldn’t find lshw

Anil

Reply

3 Gagan December 20, 2007 at 7:58 am

lshw is a different command I believe. You need to have the dag repositories installed on the server to have this pre-enabled. If not then you can get the lshw command installed. You can get that at the following link:-

http://dag.wieers.com/packages/lshw/

Reply

4 kunal singh September 29, 2008 at 7:45 am

dear sir/madam
i am using linux 5.0 ent.and connect external SCSI DLT tap drive. its show in bios but how can mount it to use for backup and recovery.

another server is configered by 16 gb of RAM, its also show in bios but in linux 5.0 ent. its show only 4 gb. what its problem and how can i solve it.

Reply

5 ~S~ December 1, 2008 at 9:26 pm

@kunal singh

If you are running 32bit, you will have to have “bigmem” enabled (possibly with the PAE extension?) in the kernel. I don’t know if CentOS provides this kernel or not. If not, you will have to roll your own.

If you are running 64bit, then it should detect all 16GB of memory. If it isn’t then you have a much bigger problem.

As for the SCSI tape drive, afraid I don’t have an answer without knowing a lot more about your setup. Maybe someone else will.

If you are indeed running CentOS try posting to the CentOS forum/mailing list.

Have fun!
~S~

Reply

6 solarmitra January 12, 2009 at 8:37 pm

I have used these command on centos/RHEL

lspci ( lists pci device)
lsusb ( lists usb device)
lsscsi ( lists scsi device)
systool
fdisk -l ( lists hard drive)
dmidecode ( lists hardware model, serial number, cpu, memory. This command was handy when i needed to find serial number without a visit to data center)
cat /proc/cpuinfo ( more on cpu)
cat /proc/meminfo ( more on memory)

you can find a lot of information by using dmesg|more or grep what you are looking
e.g.
dmesg | egrep ‘(SCSI|scsi0|ide0|hda|sda|serio|mice|eth0|eth1)’

Reply

7 zubair January 15, 2009 at 8:23 am

hello everybody
this is zubair from vijayawada
anybody please tell me what is the command to see linux system configuration

Reply

8 ani August 8, 2009 at 8:01 am

try using lspci

Reply

9 bhavani sankaram September 15, 2009 at 10:49 am

Hi Techies,

I have one requirement to capture the connected printers information from esx servers (either 2.0 or 3.0) using linux commads.

I used “lpstat” command to capture the printer information from esx servers which are in linux environment. Please help me to get this info.

Reply

10 bhavani sankaram September 15, 2009 at 10:54 am

continued (1)
using lpstat command i am not able to capture the printer information which are connected to esx servers.

Please suggest me the way to reach my requirement

Reply

11 manoj jasawat September 25, 2009 at 5:11 am

how to install —-
lan driver rtl8169 in rhel5

Reply

12 raj November 17, 2009 at 2:00 pm

How to get the hardware configuration in linux (debian )

Reply

13 Sajeevan K June 18, 2010 at 6:37 am

try dmidecode commands it gives all h/w information

Reply

14 Nino December 21, 2011 at 9:09 pm

second to Sajeevan K. then “pipe it to more: | more” since you will get a lot of info and depending on your putty session buffer you won’t be able to scroll all the way up.

Reply

15 Sathishkumar April 5, 2012 at 7:12 am

Its really worthful information. I thankful and appreciate all the commenters because Everyone wrote some useful comments in their comment

Thanks
Sathish

Reply

16 Tarique Muhiuddin August 23, 2012 at 7:14 am

Try using lspci |more

or try to use for update through internet using command

update-pciids

This command will update your hardware.

Regards.
Tarique Muhiuddin
Linux Specialist

Reply

17 Abhijit Das January 9, 2013 at 2:41 am

Need a sample script to get the below informations in Linux.

 Hardware
 Server name
 Virtual/Physical
 # of CPU
 # of Core
 Physical server name in case of virtual server
 DTAP
 Is DR applicable
 Is it part of Cluster
 Software
 Vendor name
 Software name
 Software version
 Software edition
 Service pack
 ISO 19770 tag or other when available

Reply

Leave a Comment

You can use these HTML tags and attributes for your code and commands: <strong> <em> <ol> <li> <u> <ul> <kbd> <blockquote> <pre> <a href="" title="">

Tagged as: ,

Previous Faq:

Next Faq: