Linux operating system is popular with its efficient memory usage. Also Linux operating systems provide a lot of details about their memory usage. In this tutorial we will look into details of the memory usage information. There are different ways to get memory usage information. Alternatively we can call this RAM usage. Because in the static most of the information is about RAM
Get Information With free
free is very easy and lane command to get basic information about Linux operating system memory usage. Here is Linux free memory.
$ free
- We have 1 GB ram and 441 MB of this ram is currently used.
- There is no swap memory
Human Readable Format
We can show memory usage with free more human readable by changing KB to GB like below. -h
parameters makes this magic.
$ free -h
Display In Megabyte Format
By default free
command print information about the memory in byte
format. It can be hard to read in general. We can print this information in megabyte or MB format with the --mega
option.
$ free --mega
Display In Gigabyte Format
By default free
command print information about the memory in byte
format. It can be hard to read in general. We can print this information in gigabyte or GB format with the --giga
option.
$ free --giga
Getting Information With top
top command is very detailed and interactive tool to get memory usage information.
top is a real time tool so it will update table by default in 2 seconds. To list processes with top according to memory usage use M
gnome-shell is number one process in memory consumption with %15.3 and other processes listed descending.
We can see at the top KiB Mem: line there is existing memory size and current general usage.
How To Check Memory Usage Of Linux? Infografic