How to check memory usage using the Ubuntu command line?

There are many ways to check memory usage in Ubuntu command line, here are some commonly used commands:

  1. free command: The system’s memory usage can be viewed by using the free command. Simply input the following command in the terminal:
free -h

This command will display information such as total memory, used memory, and free memory of the system.

  1. “top command: The top command can display real-time information about system memory usage and other system resources. Simply type the following command in the terminal.”
top

In the information displayed in the top command, you can view details such as total memory, used memory, and available memory of the system.

  1. Use the vmstat command to check the system’s memory usage. Simply enter the following command in the terminal:
vmstat

This command will display the system’s memory usage, including the total memory, used memory, free memory, and other information.

Here are some commonly used Ubuntu command line methods for checking memory. You can choose the appropriate command based on your own needs to view the system’s memory usage.

bannerAds