Find Linux RAM Information Command

How do I find out ram information under Linux operating systems?

You can use the following commands to find information about RAM under Linux operating systems.

Find Used and Free RAM Info Command

You need to use the free command:
# free
# free -m

             total       used       free     shared    buffers     cached
Mem:          7930       4103       3826          0         59       2060
-/+ buffers/cache:       1983       5946
Swap:        15487          0      15487

(Fig. 01: Display amount of free and used memory in the system)

Find Out Ram Speed, Make, Form Factor, Type and Other Information

You need to use the dmidecode command:
# dmidecode --type 17
# dmidecode --type memory
# dmidecode -t 17
Sample outputs:

 # dmidecode 2.11
SMBIOS 2.5 present.

Handle 0x0017, DMI type 17, 27 bytes
Memory Device
	Array Handle: 0x0016
	Error Information Handle: No Error
	Total Width: 72 bits
	Data Width: 64 bits
	Size: 2048 MB
	Form Factor: DIMM
	Set: 1
	Locator: DIMM1A
	Bank Locator: Bank1
	Type: DDR2
	Type Detail: Synchronous
	Speed: 667 MHz
	Manufacturer: 5185
	Serial Number: 05009F22
	Asset Tag: Not Specified
	Part Number: 72T232220HFA3SB 

(Fig. 01: Finding RAM Speed, Manufacturer, Type such as DDR2, and other info)

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 16 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf duf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Modern utilitiesbat exa
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg glances gtop jobs killall kill pidof pstree pwdx time vtop
Searchingag grep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
16 comments… add one
  • ray Feb 26, 2012 @ 2:30

    free -m

  • Paul Feb 26, 2012 @ 3:05


    probably just a typo, it should be:

    # dmidecode –type 17

    Thanks for very informative site,


    • 🐧 nixCraft Feb 27, 2012 @ 1:32

      Thanks for the heads up! The faq has been updated.

  • Josh Mar 5, 2012 @ 16:22


    is also a good command if you like a graphical display of RAM

  • Daniel Vieceli Mar 13, 2012 @ 2:08

    Good , i like htop.

  • Collin B Apr 10, 2012 @ 18:18

    less /proc/meminfo will give you detailed information on your systems memory. This is where all other utilities are pulling the information from.

    • Ron Oct 26, 2012 @ 0:03

      If dmidecode pulls RAM info from /proc/meminfo then it’s using some super-dodecahedral secret decoder ring because “speed” and “type” aren’t there in “cat /proc/meminfo”.

  • بدور Jun 19, 2013 @ 17:04

    عندي سؤال اذا ممكن حدا يجاوبني
    how display information in ram?

    • Ron Jun 19, 2013 @ 20:48

      Are you asking how to display the *contents* of RAM?

  • Kevin Chadwick Nov 14, 2013 @ 17:48

    So now you need to install and lookup a command to find out such basic information as the memory type when Linux used to tell you in dmesg and the BSD’s still do.

    I guess ‘modern’ Linux get’s more like windows every day. Will we be seeing vendor and product id codes in ALL cases rather than names next and hex error codes and unusable interfaces such as the registry requiring a second screen with a web browser to interpret becoming the norm.

  • Sairaju jena Jan 8, 2014 @ 8:13

    nice code.

  • Ron Jan 8, 2014 @ 19:06

    such basic information as the memory type when Linux used to tell you in dmesg

    That must have been a *long* time ago, since I’ve been using Linux since around Y2K (not for that reason though) and don’t remember dmesg ever having the level of detail that dmidecode has.

  • Pili Feb 21, 2014 @ 1:31

    Ron > those are called “Super Cow Powers”

  • Polat Jan 22, 2015 @ 8:46

    Great, Thanx a lot

  • Ridwan Dec 23, 2015 @ 2:28

    2012… Still work…. :D..
    I try type — sudo dmidecode — and all of my laptop configuration showed up… :D thx 4 dmidecode info :D

  • Trent Apr 19, 2016 @ 1:29

    Not really RAM information, more like motherboard information. Rename the post accordingly.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum