How to Check Memory Usage From the Linux Termina
Published on Aug. 22, 2023, 12:15 p.m.
There are several commands you can use to check memory usage from the Linux terminal. Here are a few examples:
freecommand - displays the total amount of free and used memory in the system:
free -m
This will display memory information in megabytes.
topcommand - displays real-time information about processes on the system, including their memory usage:
top
Press the M key to sort processes by memory usage.
htopcommand - similar totop, but with a more user-friendly interface:
htop
/proc/meminfo- this is a virtual file system that contains information about memory usage:
cat /proc/meminfo
This will display detailed information about memory usage, including total and available memory.
You can choose the command that best suits your needs. I hope this helps you check memory usage from the Linux terminal!