0
0
Linux CLIscripting~15 mins

top and htop (live monitoring) in Linux CLI - Mini Project: Build & Apply

Choose your learning style9 modes available
Monitor System Processes with top and htop
📖 Scenario: You are a system administrator who needs to check the current running processes and system resource usage on a Linux server. You will use the top and htop commands to monitor CPU, memory, and process information live.
🎯 Goal: Learn how to use the top command to view live system process information and then install and run htop for a more user-friendly interactive monitoring experience.
📋 What You'll Learn
Use the top command to display live system processes
Install htop using the package manager
Run htop to view interactive process monitoring
Exit both top and htop properly
💡 Why This Matters
🌍 Real World
System administrators and DevOps engineers use <code>top</code> and <code>htop</code> daily to monitor server health and troubleshoot performance issues.
💼 Career
Knowing how to monitor live system processes is essential for maintaining reliable and efficient servers in any IT or DevOps role.
Progress0 / 4 steps
1
Run the top command to view live system processes
Open your terminal and type top to start live monitoring of system processes. Let it run for a few seconds to observe CPU and memory usage.
Linux CLI
Need a hint?

The top command shows a live list of running processes and system resource usage. Just type top and press Enter.

2
Install htop for enhanced process monitoring
Use the package manager to install htop. If you are on Ubuntu or Debian, type sudo apt-get install htop. For CentOS or RHEL, use sudo yum install htop.
Linux CLI
Need a hint?

Use sudo apt-get install htop on Debian-based systems or sudo yum install htop on RedHat-based systems to install htop.

3
Run htop to view interactive process monitoring
After installing, type htop in the terminal to start the interactive process viewer. Notice the color-coded bars and easier navigation.
Linux CLI
Need a hint?

Simply type htop and press Enter to launch the interactive process viewer.

4
Exit top and htop properly
To exit top or htop, press the q key on your keyboard. This will return you to the normal terminal prompt.
Linux CLI
Need a hint?

Pressing q quits the live monitoring tools and returns you to the command prompt.