Monitoring CPU and RAM usage helps you optimize server performance. Here’s a quick reference to check CPU and RAM usage on a Linux server using the command line.
Step 1: Open the Terminal
Access the terminal with Ctrl + Alt + T or search for “Terminal” or “Konsole” in your system’s application menu.
Step 2: Check CPU Usage
Use the top command to display a dynamic view of system processes, including CPU usage:
topTo exit, press q.
For a more user-friendly interface, install and use htop:
sudo apt install htopStep 3: Check RAM Usage
The free command displays RAM usage. To show the output in a human-readable format, use the -h flag:
free -hThe output displays total, used, free, shared, cache, and available memory.
Now you have a quick reference for checking CPU and RAM usage on a Linux server. Regular monitoring helps optimize server performance and resource allocation.