Check Memory Usage in Linux: Top Commands
You can check the memory usage in Linux system by using the following command:
- Utilize the free command:
free -m
This command can display the system’s memory usage, including information on used memory, free memory, buffers, and cache.
- Use the top command:
top
In the output of the top command, you can view the current system memory usage and memory usage of processes.
- Execute the htop command:
If htop is not installed, you can use the following command to install it:
sudo apt-get update
sudo apt-get install htop
Then you can use the htop command to check the memory usage, including memory usage rate, cache, swap space and other information.