In Ubuntu, you can check the RAM (Random Access Memory) usage of your system using different methods. Knowing the amount of RAM used and available is essential for troubleshooting and optimizing your system’s performance. In this guide, we will go through the steps to check the RAM on Ubuntu using different commands and tools.
Step 1: Check RAM Using the “free” Command
The “free” command displays the amount of free and used memory in the system. To use this command, open a terminal and type the following command:
free
The output will display the total amount of RAM, used RAM, free RAM, and shared memory. The output will also show the buffers and cached memory.
root@geeks:~# free total used free shared buff/cache available Mem: 16424164 966948 14938512 81844 518704 15102152 Swap: 0 0 0
Step 2: Check RAM Using the “top” Command
The “top” command displays the system processes and their resource usage, including RAM usage. To use this command, open a terminal and type the following command:
top
The output will display the list of processes running on the system, including their PID, user, CPU usage, and RAM usage.
top - 18:24:39 up 1:45, 1 user, load average: 0.06, 0.02, 0.00 Tasks: 176 total, 1 running, 110 sleeping, 0 stopped, 0 zombie %Cpu(s): 0.0 us, 0.0 sy, 0.0 ni,100.0 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st KiB Mem : 16424164 total, 14941492 free, 963700 used, 518972 buff/cache KiB Swap: 0 total, 0 free, 0 used. 15105388 avail Mem
Step 3: Check RAM Using the System Monitor
The System Monitor is a graphical tool that displays the system processes and resource usage. To use this tool, go to the Applications menu, click on the System Tools, and select the System Monitor. In the System Monitor, go to the Resources tab, and you will see the RAM usage and other resource usage information.
Step 4: Check RAM Using the “htop” Command (Optional)
The “htop” command is an enhanced version of the “top” command, which displays the system processes and their resource usage in a more user-friendly way. To use this command, open a terminal and type the following command:
sudo apt-get install htop htop
The output will display the list of processes running on the system, including their PID, user, CPU usage, and RAM usage.
Commands Mentioned:
- free – a command that displays the amount of free and used memory in the system.
- top – a command that displays the system processes and their resource usage, including RAM usage.
- htop – an enhanced version of the “top” command that displays the system processes and their resource usage in a more user-friendly way.
Conclusion:
In this guide, we have gone through the steps to check the RAM on Ubuntu using different commands and tools. By using these commands and tools, you can easily obtain the necessary information about the RAM usage of your system. If you have any questions or suggestions, feel free to comment below.