How to check RAM size in Ubuntu. In this tutorial, You are going to learn linux command to check RAM size and system memory information.
Check RAM Size in Linux, Ubuntu
To check RAM in your Linux system open the terminal (Ctrl + Alt + T) and type the following command mentioned below.
Display the RAM size in Megabytes (MB).
1 |
$ free -m |
Output –
1 2 3 4 |
total used free shared buffers cached Mem: 7900 7435 465 569 27 993 -/+ buffers/cache: 6414 1486 Swap: 3904 854 3050 |
This command will show your total,free and used RAM.
The free command displays free and used memory in the system. free -m displays the amount of memory in megabytes.
To Display the RAM size in Gigabytes(GB). Use command free -g.
1 2 3 4 5 |
$ free -g total used free shared buffers cached Mem: 7 7 0 0 0 0 -/+ buffers/cache: 6 1 Swap: 3 0 2 |
How to Install, Uninstall packages using apt-get utility.
If you want check the linux RAM size in Kilobytes(KB). Then type command free or free -k.
1 2 3 4 5 |
$ free -k total used free shared buffers cached Mem: 8090132 7701836 388296 578340 30400 1018016 -/+ buffers/cache: 6653420 1436712 Swap: 3998716 871056 3127660 |
You can get complete system memory information by typing following command.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
$ cat /proc/meminfo MemTotal: 8090132 kB MemFree: 423780 kB Buffers: 30728 kB Cached: 1021596 kB SwapCached: 142744 kB Active: 3702560 kB Inactive: 1244792 kB Active(anon): 3515792 kB Inactive(anon): 982028 kB Active(file): 186768 kB Inactive(file): 262764 kB Unevictable: 2391212 kB Mlocked: 2391212 kB SwapTotal: 3998716 kB SwapFree: 3127744 kB Dirty: 1512 kB Writeback: 0 kB AnonPages: 6226880 kB Mapped: 635208 kB Shmem: 579536 kB Slab: 136488 kB SReclaimable: 82412 kB SUnreclaim: 54076 kB KernelStack: 8376 kB PageTables: 87872 kB NFS_Unstable: 0 kB Bounce: 0 kB WritebackTmp: 0 kB CommitLimit: 8043780 kB Committed_AS: 15837952 kB VmallocTotal: 34359738367 kB VmallocUsed: 357216 kB VmallocChunk: 34359318444 kB HardwareCorrupted: 0 kB AnonHugePages: 3084288 kB HugePages_Total: 0 HugePages_Free: 0 HugePages_Rsvd: 0 HugePages_Surp: 0 Hugepagesize: 2048 kB DirectMap4k: 75516 kB DirectMap2M: 5083136 kB DirectMap1G: 3145728 kB |
If you know some other better ways to check system and ram information then let us know through your comments.