btop — terminal system monitor
💬 "btop command"
btop is a terminal system monitor that replaces htop. It displays CPU, memory, and network on one screen.
It visualizes system resources in real time. It integrates htop's process management and resource monitoring.
- Concept: It visualizes system resources in real time.
- Main Features: It integrates htop's process management and resource monitoring.
- Advantages: It also displays network traffic.
- Usage: It operates using only the keyboard without a mouse.
Installation and Download
btop can be installed via a package manager or the official script.
| Environment | Command |
|---|---|
| Ubuntu / Debian | sudo apt install btop |
| Fedora / RHEL | sudo dnf install btop |
| Arch | sudo pacman -S btop |
| macOS (brew) | brew install btop |
| Build from Source | git clone https://github.com/aristocratos/btop && make |
| Binary Download | github.com/aristocratos/btop/releases |
Verify installation with btop --version.
Frequently Used Options
| Option | Description |
|---|---|
| 1 | Switch to CPU graph mode |
| 2 | Switch to memory graph mode |
| 3 | Switch to network graph mode |
| t | View process tree |
| q | Exit |
Essential Command Combinations
btop— Start full system monitorbtop --preset cpu_mem_net— Start with CPU, memory, network presetbtop --color monokai— Set theme to monokai
💬 "Show an example of using btop on a real server"
I have compiled common situations encountered on production servers in order.
Step 1 · Verify Installation
Verify if installed.
btop --version || sudo apt install -y btop
Step 2 · Start System Monitor
Run btop.
btop
Step 3 · Process Management
Check processes with high CPU usage.
Press t in btop to view tree
Actual Execution Screen
This is the result after running btop, showing CPU, memory, and network on one screen.
!btop command execution result
Production server
In Practice, It Is Used Like This
1. Check CPU Overload
Situation — Find processes with high CPU usage.
Press 1 in btop for CPU mode
Result — Usage per core is displayed as bars.
Point — If a specific core is at 100%, there may be a thread issue.
2. Check Memory Leak
Situation — Find processes with increasing memory usage.
Press 2 in btop for memory mode
Result — Memory usage per process is displayed.
Point — Processes that do not decrease over time are suspected of leaks.
Actual Execution Screen
This is the screen after switching to process tree view mode.
!btop command execution result 2
Production server
Things to Note
- btop recommends a 256-color terminal. In 8-color terminals, graphs are limited.
- In SSH remote sessions, if the terminal size is small, the screen may break.
- The keyboard controls are partly different from htop. Check the help with the ? key.
Source (HTML): https://games.aidebatehub.com/programs/linux/modern/btop.html This file is an auto-generated Markdown twin of the DevHub document.
AI Knowledge Hub
Visitor Comments