If you are looking to upgrade the memory in your Linux PC, you are probably wondering how many open slots you have, what type of memory is already installed, and what you need to buy for an upgrade… without having to open your computer.

Since you shouldn’t have to open up the computer just to figure out what you have installed, here’s how to detect the type of memory your Linux PC has installed without having to open up the case.

Note: be sure to read our article on how to tell what type of memory your Windows PC has installed.

How to Show the Installed Memory

Open up a terminal window and type in the following command:

sudo dmidecode --type memory

At the beginning of the output you’ll see the maximum memory size allowed by your PC, which is important—you can’t put two 4GB memory modules into a machine that only allows a total of 4GB of RAM.

Once you’ve scrolled down a little further, you’ll see the rest of the memory details for each piece of RAM that’s installed. Here’s a sample from one of my Linux boxes, and I’ve highlighted the important bits in bold text.

Handle 0x0120, DMI type 17, 27 bytes
Memory Device
        Array Handle: 0x011F
        Error Information Handle: No Error
        Total Width: 64 bits
        Data Width: 64 bits
        Size: 512 MB
        Form Factor: DIMM
        Set: None
        Locator: DIMM0
        Bank Locator: BANK 0
        Type: DDR2
        Type Detail: Synchronous
        Speed: 667 MHz (1.5 ns)
        Manufacturer: 0x7F7F7F0B00000000
        Serial Number: 0xC773441A
        Asset Tag: Unknown
        Part Number: 0x4E543531325436345548384230464E2D3343

You’ll see that I’ve got DDR2-667 RAM installed on the system, so if I’m going to upgrade, I’ll need to find RAM that matches.

Other Options for Finding the Memory Type

Here’s a few other options that you can use:

  • You can look up the specs for your system to figure out what memory types your computer takes. I usually google for “modelnumber specs”, for instance I’d type in “nc8430 specs”.
  • Pull out the manual for your computer or motherboard, and take a look at your receipts to figure out what you bought last time.
  • If you built a computer with parts from Newegg, you can look at your order history to re-order the exact same memory module if you know you have empty slots.
  • If you are running Mac OS X, you can just look under your “About this Mac” and then click on More Info.

If you’re running Windows instead, make sure to read our article on how to tell what type of memory your Windows PC has installed.

Profile Photo for Lowell Heddings Lowell Heddings
Lowell is the founder and CEO of How-To Geek. He’s been running the show since creating the site back in 2006. Over the last decade, Lowell has personally written more than 1000 articles which have been viewed by over 250 million people. Prior to starting How-To Geek, Lowell spent 15 years working in IT doing consulting, cybersecurity, database management, and programming work.
Read Full Bio »