Contents
Its just like what happens on your desktop PC.
- free command. The free command is the most simple and easy to use command to check memory usage on linux.
- /proc/meminfo. The next way to check memory usage is to read the /proc/meminfo file.
- vmstat.
- top command.
- htop.
How do I check memory usage on Ubuntu?
In order to view the memory usage, we are using the Ubuntu command line, the Terminal application. You can open the Terminal either through the system Dash or the Ctrl+alt+T shortcut.
5 Ways to Check Available Memory in Ubuntu
- The free command.
- The vmstat command.
- The /proc/meminfo command.
- The top command.
- The htop command.
How do I free up memory on Linux?
Every Linux System has three options to clear cache without interrupting any processes or services.
- Clear PageCache only. # sync; echo 1 > /proc/sys/vm/drop_caches.
- Clear dentries and inodes. # sync; echo 2 > /proc/sys/vm/drop_caches.
- Clear PageCache, dentries and inodes.
- sync will flush the file system buffer.