Monday, September 27, 2010

Linux: How to check the hardware

Linux: How to check the hardware

I've noticed there are no good tutorials on how to check what hardware you have installed on your machine. In Linux there are many ways doing this so it's not an issue but you have to know the needed commands.

I'll start step by step checking different devices on your computer but there is a tool wich shows all so if you don't want to read much just scroll down to the lshw command.

Check on the CPU:

Here is the command that will help you to see what CPU you have installed:

root@Linux ~# cat /proc/cpuinfo

This will print the whole needed information for your CPU. Here is an example:

processor : 0
vendor_id : GenuineIntel
cpu family : 15
model : 2
model name : Intel(R) Celeron(R) CPU 2.40GHz
stepping : 9
cpu MHz : 2400.485
cache size : 128 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe up pebs bts cid xtpr
bogomips : 4805.18
clflush size : 64

Checking VGA, LAN and wireless adapters, chipset etc:

root@Linux ~# lspci

Example result:

00:00.0 Host bridge: Intel Corporation 82865G/PE/P DRAM Controller/Host-Hub Interface (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 82865G Integrated Graphics Controller (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev c2)
00:1f.0 ISA bridge: Intel Corporation 82801EB/ER (ICH5/ICH5R) LPC Interface Bridge (rev 02)
00:1f.1 IDE interface: Intel Corporation 82801EB/ER (ICH5/ICH5R) IDE Controller (rev 02)
00:1f.3 SMBus: Intel Corporation 82801EB/ER (ICH5/ICH5R) SMBus Controller (rev 02)
01:0d.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL-8139/8139C/8139C+ (rev 10)

Checking the hard drives:

root@Linux ~# fdisk -l

Example:

isk /dev/hda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x90909090

Device Boot Start End Blocks Id System
/dev/hda1 1 13 104391 83 Linux
/dev/hda2 14 139 1012095 82 Linux swap / Solaris
/dev/hda3 140 9729 77031675 83 Linux

lshw

The easiest way to check all the hardware installed on your box is the lshw command.

Using this command you can see all the hardware. Use the update manager of your distribution to install it if the command line says that the command doesn't exist. The package name is lshw as well.

root@Linux ~# lshw

I won't paste an example for this command since the result is always too huge but it lists everything you need to know.

I hope it was helpful.

No comments:

Post a Comment