get the hardware info in linux code example
Example 1: linux command to show memory hardware
# List RAM Memory Information
dmidecode -t memory | grep -i size
Example 2: linux command to show memory hardware
# free - Check RAM
$ free -m
total used free shared buffers cached
Mem: 7975 5865 2110 0 24 622
-/+ buffers/cache: 5218 2757
Swap: 1951 921 1030