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 0×0120, DMI type 17, 27 bytes
Array Handle: 0×011F
Error Information Handle: No Error
Total Width: 64 bits
Data Width: 64 bits
Size: 512 MB
Form Factor: DIMM
Bank Locator: BANK 0
Type Detail: Synchronous
Speed: 667 MHz (1.5 ns)
Serial Number: 0xC773441A
Asset Tag: Unknown
Part Number: 0×4E543531325436345548384230464E2D3343
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.