To check the memory usage on a Linux system, you can use the following command-line and graphical user interface (GUI) tools:
free
: The free
command displays information about the system's memory usage, including the total amount of physical memory, the amount used, and the amount free. Here's an example of how to use free
:$ free -m
The -m
option tells free
to display the sizes in megabytes.
top
: The top
command displays a real-time list of the processes running on the system, sorted by CPU and memory usage. You can use it to monitor the memory usage of the system and individual processes. Here's an example of how to use top
:$ top
Press q
to exit top
.
vmstat
: The vmstat
command displays information about the system's memory, swap, and CPU usage. You can use it to monitor the overall memory usage of the system. Here's an example of how to use vmstat
:$ vmstat
System Monitor: Many desktop environments, such as GNOME and KDE, include a System Monitor utility that allows you to view the system's resource usage, including the memory usage. You can usually find the System Monitor in the "System Settings" or "Control Center" of your desktop environment.
Task Manager: Some desktop environments, such as Xfce and Cinnamon, include a Task Manager utility that allows you to view and manage the processes running on the system, including the memory usage. You can usually find the Task Manager in the system tray or by pressing Ctrl+Alt+Delete
.
Note: The specific options and syntax for these commands and utilities may vary depending on your Linux distribution and version. Consult the man pages or documentation for your system for more information.