How Much RAM does my Ubuntu / Fedora Linux desktop PC have?

Here is one of the most frequently asked questions from my mailbag:

Hey I need to know how much ram memory I have in my Ubuntu Linux computer. Under Windows XP I can find out memory by visiting Start > Control Panels > System in control panel. So how do I find out RAM information under Linux PC?

The best way to find out RAM information such as amount of free and used memory in the system is to open a terminal and type the following command:

$ free -m
$ free -mt
Sample outputs:

             total       used       free     shared    buffers     cached
Mem:          2008       1837        170          0         50        963
-/+ buffers/cache:        822       1185
Swap:         1027          0       1027

The above output indicate that I have 2GB total RAM on my system. free command print the total amount of free and used physical and swap memory in the system, as well as the buffers used by the Linux kernel. You can pass following options

  • -b switch displays the amount of memory in bytes
  • -k switch (set by default) displays it in kilobytes
  • -m switch displays it in megabytes.
  • -t switch displays a line containing the totals.
  • -o switch disables the display of a “buffer adjusted” line. If the -o option is not specified, free subtracts buffer memory from the used memory and adds it to the free memory reported.
  • -s switch activates continuous polling delay seconds apart. You may actually specify any floating point number for delay, usleep(3) is used for microsecond resolution delay times.

You can also type top or htop command to see ram information:
# top
# htop

Sample outputs:

htop command displaying used and free ram along with other system info on Linux

GUI tool – gnome-system-monitor

The gnome-system-monitor provides an overall view of the resource usage on your system, including memory and CPU allocation. Start gnome-system-monitor from Menus or just type:
$ gnome-system-monitor &
Sample outputs:

Another Good system monitor – Conky

Conky is a system monitor for X originally based on the torsmo code. Run apt-get command to install conky:
$ sudo apt-get install conky

Conky can display just about anything, either on your root desktop or in it’s own window. Conky has many built-in objects, as well as the ability to execute programs and scripts, then display the output from stdout.

To start conky copy default config file and type conky at shell prompt:
$ zcat /usr/share/doc/conky/examples/conkyrc.sample.gz > .conkyrc
$ conky &

$ conky -a left_top &

Read man page of conky for more customization options.

phpSysInfo – PHP script that displays information such as RAM, CPU et all

You can obtained pretty much same information over Internet using webbased php tool called phpSysInfo.

(click to enlarge)

Related media

Here are five commands that can display various info about installed RAM on the system:

Video 01: 5 Linux Commands: To See Amount Of Free and Used Memory

I’d love to hear if anyone has used additional cool GUI tool like conky for this kind of system analysis/monitoring.

🐧 Please support my work on Patreon or with a donation.
🐧 Get the latest tutorials on Linux, Open Source & DevOps via:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig 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 jobs killall kill pidof pstree pwdx time
Searchinggrep 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
13 comments… add one
  • sasa Jul 17, 2011 @ 19:35

    i use this command “top” 🙂

  • narcissus Jul 16, 2011 @ 20:54

    watch -n.1 ‘cat /proc/interrupts ‘
    watch -n.1 ‘cat /proc/meminfo’

  • ben May 16, 2011 @ 12:09

    My favorite tool is htop

    I run it on Linux and Mac os X

  • Will Feb 4, 2011 @ 13:05

    That phpsysinfo link is great. Thanks for the tip.

  • sudharsan Apr 28, 2010 @ 7:46

    how to check size in gb or mb , guide me which command i have to type ,
    and putty is not connecting to ubuntu machines yyyyyyyyy

  • awned Jul 27, 2009 @ 21:25


    free -m barely uses any memory where ass gnome-system-monitor has to load itself into the ram, thus the difference 😉

  • Anjanesh Feb 28, 2009 @ 10:38

    username@ubuntu:~$ free -m
    total used free shared buffers cached
    Mem: 2007 1594 412 0 48 833
    -/+ buffers/cache: 713 1294
    Swap: 3153 2 3151

    But gnome-system-monitor shows 765MB of 2GB used ! How come the difference ?

  • sethu May 4, 2007 @ 3:00

    Latest version of linux will wwokr
    free -g :# will show in GB

  • 🐧 nixCraft Apr 29, 2007 @ 18:28


    Heh, somehow I missed that one too but for newbie free command is the best way to go, IMPO

  • xio Apr 29, 2007 @ 15:51

    Gah! Vivek, `cat /proc/meminfo` 🙂

  • xio Apr 25, 2007 @ 16:47


    The point is that you can create as many tabs as you wish with arbitrary number of graphs – just drag’n’drop a sensor from the left panel (choose from _lots_ of them), then you will be promted for the graph type. After that it will be possible to set many different properties for the graphs. I call this ‘flexibility’ and it is IMO KDE by its nature 🙂

  • 🐧 nixCraft Apr 25, 2007 @ 11:45


    Just installed ksysguard, looks good and very simple 🙂

  • xio Apr 25, 2007 @ 11:16

    > I’d love to hear if anyone has used additional cool GUI tool
    Heh, ksysguard of course! Much more flexible than other tools.

Leave a Reply

Your email address will not be published. Required fields are marked *

Use HTML <pre>...</pre> for code samples. Problem posting comment? Email me @