How do i view how much ram is installed on my PC It's supposed to be 8GB but with a command i tried it says 6GB ram and 2GB swap file

            total        used        free      shared  buff/cache   available
Mem:        6111392     1968428     1709540       60312     2433424     3794260
Swap:       2097148           0     2097148
  • 1
    See vitux.com/5-ways-to-check-available-memory-in-ubuntu Which command did you enter? Please copy what you typed in to run it and what appeared on the screen as a result; click edit and paste that into your question. Please don't use Add Comment; please instead use edit.
    – K7AAY
    Commented Sep 25, 2019 at 17:44
  • 1
    Ok i have done that. Thx
    – venomx
    Commented Sep 25, 2019 at 18:01
  • You haven't given us much information about your physical system? Is it a laptop? Desktop? Some server you're ssh'ing into? Why are you assuming it should be 8Gb? My answer and K7AAY's link are more than plenty for you to find the total memory on your system
    – j-money
    Commented Sep 25, 2019 at 18:03
  • 1
    It said 8GB DDR4 Ram when i purchased it, just a desktop
    – venomx
    Commented Sep 25, 2019 at 18:04
  • 2
    Does this answer your question? How to check RAM size? Commented Mar 14 at 2:57

1 Answer 1


To view how much ram your system has, you can use the free command

[sol Build]$ free -h

              total        used        free      shared  buff/cache   available
Mem:           15Gi       3.0Gi       6.5Gi       842Mi       6.0Gi        11Gi
Swap:         8.0Gi          0B       8.0Gi

if you're interested, you can also check out whats going on in /proc

cat /proc/meminfo

or to get the total physical ram installed in the system

awk '/MemTotal/ {print $2}' /proc/meminfo

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .