What command to issue to find if my RAM is either DDR2 or DDR3
Running dmidecode
or lshw
should show the type. Might require root privileges to check, however.
According to https://askubuntu.com/questions/18372/how-can-i-find-out-what-ram-a-computer-system-has , the one-liner you're looking for is
sudo lshw -short -C memory
This will spit out something along the lines of
H/W path Device Class Description
===========================================================
/0/0 memory 64KiB BIOS
/0/4 memory 256KiB L1 cache
/0/5 memory 1MiB L2 cache
/0/6 memory 8MiB L3 cache
/0/7 memory 8200MiB System Memory
/0/7/0 memory 4GiB DIMM DDR3 Synchronous
/0/7/1 memory DIMM [empty]
/0/7/2 memory 4GiB DIMM DDR3 Synchronous
/0/7/3 memory DIMM [empty]
/0/7/4 memory 8MiB FLASH
Be aware that the human-readable string (4GiB DIMM DDR3
) is self-reported by the RAM and/or BIOS, so it isn't in any standardized format. If you're really lucky, it will explicitly say DDR3
or DDR4
. Otherwise, if it indicates a frequency in MHz, you can try to distinguish based on that.
From Wikipedia:
DDR1: 2.5 V, 133–200 MHz
DDR2: 200–400 MHz
DDR3: 1.5 V, 400–800 MHz (up to 1400 MHz for super-high-end)
DDR4: 1.2 V, 2133–4266 MHz
For example: My other computer's DDR4 RAM shows up in lshw -short -C memory
as simply 16GiB DIMM Synchronous 2133 MHz (0.5 ns)
. The MHz rating indicates that it's almost certainly DDR4.
Here's the exact way to find out whether you have DDR2 or DDR3 Memory on Debian or Ubuntu systems:
sudo dmidecode | grep DDR
It will return something like this:
Type: DDR3
Or you can do this:
sudo lshw | grep DDR
It will return a bit more information, like this:
description: SODIMM DDR3 Synchronous 1600 MHz (0.6 ns)
You're welcome.
Use this to find type and speed of RAM on Linux:
sudo dmidecode --type 17|agrep -i 'speed|size|type'
Tested on Cent OS, Fedora, RHEL, Scientific Linux