I'm looking for a way to find out what kind of RAM a system has (clocking speed, DDR-X etc.). Is there a specific command for that? I'm only aware of free or lspci which don't offer those things.


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.

  • 6
    This depends on the RAM and BIOS to some extent. My memory is reported as 2GiB DIMM 400 MHz (2.5 ns) where yours shows 2GiB SODIMM DDR2 Synchronous 667 MHz (1.5 ns) (so doesn't show the type or speed accurately - It's DDR3 at 200MHz memory clock, 800MHz bus clock) – Oli Dec 21 '10 at 11:54
  • Good catch. Unfortunately, I think this is as good as it gets. – Stefano Palazzo Dec 21 '10 at 21:19
  • 1
    I'd be cool if someone could add if the second method is any more reliable. – Stefano Palazzo Jan 4 '11 at 21:08
  • 1
    DO dmidecode and lshw work with ARM embedded devices. – Ankur Agarwal May 17 '12 at 19:14

Not the answer you're looking for? Browse other questions tagged or ask your own question.