Skip to main content
htop is an interactive process viewer and system monitor that provides a more user-friendly alternative to the traditional top command.
1

Update package lists

First, update your package lists:
sudo apt update
2

Install htop

Install htop using the apt package manager:
sudo apt install htop -y
3

Run htop

Start htop to monitor your system:
htop
You’ll see an interactive interface showing:
  • CPU usage
  • Memory usage
  • Running processes
  • System load
4

Exit htop

To quit htop, press q.

Basic htop navigation

Process management

  • F9 - Kill a process
  • F4 - Filter processes
  • F5 - Tree view
  • F6 - Sort by column

System information

  • F1 - Help
  • F2 - Setup
  • F3 - Search
  • F10 - Quit

Mouse support

  • Click on column headers to sort
  • Click on processes to select them
  • Use scroll wheel to navigate

htop configuration

Create a custom configuration file:
mkdir -p ~/.config/htop
cp /etc/htoprc ~/.config/htop/htoprc
Edit the configuration:
nano ~/.config/htop/htoprc
Common settings:
# Show CPU usage per core
cpu_count_from_one=0

# Show memory in MB
memory_show_meminfo=1

# Update interval (in seconds)
update_interval=2.0

Alternative system monitors

Install glances (more detailed)

sudo apt install glances

Install bashtop (modern interface)

sudo apt install bashtop

Next Steps

Now that htop is installed, you can:
  • Monitor system performance in real-time
  • Identify resource-intensive processes
  • Manage running processes
  • Troubleshoot system issues

Build docs developers (and LLMs) love