There are several ways to check memory utilization and usage in Linux:
freecommand: Thefreecommand is used to check the total amount of free and used physical and swap memory in the system, as well as the shared memory and buffers used by the kernel.
$ free -m
topcommand: Thetopcommand provides a real-time view of the processes running on the system, including the memory usage of each process. Press ‘Shift + m’ to sort the process by memory usage.
$ top
vmstatcommand: Thevmstatcommand provides information about system processes, memory, paging, block IO, traps, and CPU activity.
$ vmstat -s
htopcommand: Thehtopcommand provides an interactive process viewer similar to thetopcommand, but with additional features such as color-coded system status and memory usage.
$ htop
/proc/meminfo: You can also check the memory usage by reading the/proc/meminfofile, which contains information about the system’s memory usage.
cat /proc/meminfo
These commands will give you an idea of the current memory utilization and usage on your Linux system, and help you identify any potential issues or bottlenecks.