1

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
venomx
  • 305
  • 1
    See https://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 Sep 25 '19 at 17:44
  • 1
    Ok i have done that. Thx – venomx Sep 25 '19 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 Sep 25 '19 at 18:03
  • 1
    It said 8GB DDR4 Ram when i purchased it, just a desktop – venomx Sep 25 '19 at 18:04
  • @venomx Please also run awk '/MemTotal/ {print $2}' /proc/meminfo and add it into your question with [edit]. TY for what you've done so far. – K7AAY Sep 25 '19 at 18:13
  • Going by what I posted from the terminal in my original post do I have 8GB? – venomx Sep 25 '19 at 18:13
  • Ok I looked into the machine and the brand of ram I have only come in 8GB, 16GB, 32GB, 64GB SO it can't possibly be 6GB. Im guessing 6GB is being used for Ram and 2GB for my swap file – venomx Sep 25 '19 at 18:20
  • I did that command and it says " 6111376 " – venomx Sep 25 '19 at 19:39
  • search for Memory: in /var/log/kern.log. That line will tell you how memory is allocated at boot time. See also here. – Doug Smythies Sep 25 '19 at 20:01
  • How many memory modules do you have on your motherboard? – K7AAY Sep 25 '19 at 23:16
  • two slots, so must be 2x4GB as they don't come any smaller – venomx Sep 26 '19 at 05:43
  • 2
    Does this answer your question? How to check RAM size? – John Carter Mar 14 '24 at 02:57

1 Answers1

4

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
j-money
  • 2,382