To check the usage of memory in Ubuntu 16.04, you can use the following command in the terminal:
free -m
This command will display the amount of free, used, and total memory available in the system in MB (megabytes). Specifically, the output of this command shows:
Total: the total amount of RAM available in the system.
Used: the amount of RAM currently in use.
Free: the amount of RAM currently not being used.
Shared: the memory being used by shared libraries.
Buffers: the memory being used by the kernel to cache data from disk.
Cache: the memory being used by the kernel to cache data from disk and file systems.
Here’s an example output of the free -m command:
1 | total used free shared buff/cache available |
In this example, the system has 7981 MB of total memory available, 1161 MB of which are currently in use, 4663 MB are free, and 2156 MB are being used as cache memory.y.