how to find out hardware info linux code example
Example 1: linux command to show memory hardware
$ lspci
00:00.0 Host bridge: Intel Corporation 82G35 Express DRAM Controller (rev 03)
00:02.0 VGA compatible controller: Intel Corporation 82G35 Express Integrated Graphics Controller (rev 03)
00:02.1 Display controller: Intel Corporation 82G35 Express Integrated Graphics Controller (rev 03)
00:19.0 Ethernet controller: Intel Corporation 82566DC Gigabit Network Connection (rev 02)
00:1a.0 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller
00:1a.1 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller
00:1a.7 USB controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller
00:1b.0 Audio device: Intel Corporation 82801H (ICH8 Family) HD Audio Controller (rev 02)
00:1c.0 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 1 (rev 02)
00:1c.1 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 2 (rev 02)
00:1c.2 PCI bridge: Intel Corporation 82801H (ICH8 Family) PCI Express Port 3 (rev 02)
00:1d.0 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller
00:1d.1 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller
00:1d.2 USB controller: Intel Corporation 82801H (ICH8 Family) USB UHCI Controller
00:1d.7 USB controller: Intel Corporation 82801H (ICH8 Family) USB2 EHCI Controller
00:1e.0 PCI bridge: Intel Corporation 82801 PCI Bridge (rev f2)
00:1f.0 ISA bridge: Intel Corporation 82801HB/HR (ICH8/R) LPC Interface Controller (rev 02)
00:1f.2 IDE interface: Intel Corporation 82801H (ICH8 Family) 4 port SATA Controller [IDE mode] (rev 02)
00:1f.3 SMBus: Intel Corporation 82801H (ICH8 Family) SMBus Controller (rev 02)
00:1f.5 IDE interface: Intel Corporation 82801HR/HO/HH (ICH8R/DO/DH) 2 port SATA Controller [IDE mode] (rev 02)
03:00.0 IDE interface: JMicron Technology Corp. JMB368 IDE controller
04:05.0 FireWire (IEEE 1394): LSI Corporation FW322/323 [TrueFire] 1394a Controller (rev 70)
Example 2: linux command to show memory hardware
$ df -H
Filesystem Size Used Avail Use% Mounted on
/dev/sda6 104G 26G 73G 26% /
none 4.1k 0 4.1k 0% /sys/fs/cgroup
udev 4.2G 4.1k 4.2G 1% /dev
tmpfs 837M 1.6M 835M 1% /run
none 5.3M 0 5.3M 0% /run/lock
none 4.2G 13M 4.2G 1% /run/shm
none 105M 21k 105M 1% /run/user
/dev/sda8 210G 149G 51G 75% /media/13f35f59-f023-4d98-b06f-9dfaebefd6c1
/dev/sda5 105G 31G 75G 30% /media/4668484A68483B47