How can I find out what RAM a computer system has? [duplicate]
Yes there is:
sudo lshw -short -C memory
It will output something like this:
H/W path Class Description
====================================================
/0/0 memory 106KiB BIOS
/0/4/5 memory 64KiB L1 cache
/0/4/6 memory 1MiB L2 cache
/0/d memory 3GiB System Memory
/0/d/0 memory 1GiB SODIMM DDR2 Synchronous 667 MHz (1.5 ns)
/0/d/1 memory 2GiB SODIMM DDR2 Synchronous 667 MHz (1.5 ns)
You may also want to take a look at the full output of sudo lshw -short
or even sudo lshw
to get much more information about your hardware.
My thanks to jet and CYREX for pointing out a much better method:
sudo dmidecode -t memory
Which outputs something like this:
...
Handle 0x000F, DMI type 17, 27 bytes
Memory Device
Array Handle: 0x000D
Error Information Handle: No Error
Total Width: 64 bits
Data Width: 64 bits
Size: 2048 MB
Form Factor: SODIMM
Set: 1
Locator: M2
Bank Locator: Bank 1
Type: DDR2
Type Detail: Synchronous
Speed: 667 MHz (1.5 ns)
Manufacturer: Mfg 1
Serial Number: 1234-B1
Asset Tag: Not Specified
Part Number: SODIMM001
...
This method is based on the Desktop Management Interface:
From 1999, Microsoft required OEMs and BIOS vendors to support the DMI interface/data-set in order to have Microsoft certification.(1)
It should therefore work pretty reliably.