Below, we have mentioned the few commands which use to check how much memory is being used by Linux.
top
The top command can display system summary information as well as a list of the process currently being managed by the Linux kernel.
free
The “free” command usually displays the total amount of free and used physical and swap memory in the system, as well as the buffers used by the kernel. To see the size of the memory in (MB) megabytes use option as -m.
free -m
htop
The htop command is used to view processes in an interactive mode and also displays information about memory usage.
vmstat
The vmstat command is used to display information about virtual memory statistics.