What command to issue to find if my RAM is either DDR2 or DDR3

25

6

Fedora 14 HP Netbook 210 Mini

My netbook had 1 GB of DDR3 memory. However, that wasn't enough. So I decided to replace the 1 GB with a 2GB or DDR3.

However, what command can I issue to be sure that I am using DDR3.

I tried the following cat /proc/meminfo

However, it didn't list any information about DDR3.

Is there some other command I can use?

Many thanks for any suggestions.

ant2009

Posted 2010-12-11T05:45:31.853

Reputation: 2 595

1Have you tried dmidecode? – Malabarba – 2010-12-11T06:20:56.680

Answers

23

Running dmidecode or lshw should show the type. Might require root privileges to check, however.

Sathyajith Bhat

Posted 2010-12-11T05:45:31.853

Reputation: 58 436

@DavidSchwartz, your comment is wrong and your link is dead. Instead of posting such tiny comments, consider posting an answer of your own with more details than can fit in the tiny comment field. :) (For example, if dmidecode were inaccurate, what would you use instead? That would make a good answer.) – Quuxplusone – 2015-03-17T23:32:26.490

@Quuxplusone The comment was correct and the link was live when it was made. Unfortunately, you can't edit comments years later, so it's impossible to keep them up to date. If I had better information at the time, I would have left an answer rather than just a comment. But I didn't, and I felt it was important to warn anyone reading the answer that they couldn't rely on the information dmidecode gives. – David Schwartz – 2015-03-17T23:51:01.653

to just get memory info, you can use dmidecode -t memory or lshw -c memory – pd12 – 2016-12-15T16:26:37.317

If dmidecode doesn't list DDR anywhere, can I infer this information from any other bits of data? – palswim – 2018-02-14T06:52:08.203

Found it using dmidecode. However, lshw return 'command not found'. – ant2009 – 2010-12-11T07:32:58.817

It is well known that dmidecode is inaccurate in reporting memory information. See here

– David Schwartz – 2012-01-12T00:49:44.353

13

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.

Quuxplusone

Posted 2010-12-11T05:45:31.853

Reputation: 227

2

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.

Apofis

Posted 2010-12-11T05:45:31.853

Reputation: 41

As noted in the comment posted more than two years ago, to Sathya's answer posted more than three years ago, dmidecode is inaccurate. And lshw wouldn't work for the original poster. – ChrisInEdmonton – 2014-04-24T00:12:01.267

1

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

Angsuman Chakraborty

Posted 2010-12-11T05:45:31.853

Reputation: 111