Install and use 'htop' when the Linux 'top' command isn't wide enough or is too hard to read
I was trying to troubleshoot an issue on an NVIDIA AI Workbench WSL instance and the top program didn't show enough information. It was hard to read the monochrome output and the command section was too narrow to tell me the full program launch commands with all the parameters. The NVIDIA VMs had htop installed which colorized pieces of information and displayed at full widescreen width.
Installation htop on Ubuntu
- Install with apt
- apt update && apt install htop
- in my case sudo apt
- sudo apt update && apt install htop
Installing htop in a WSL Instance (Ubuntu)
- Find the WSL instance
- wsl -l -v
- Shell into the VM using the wsl command
- wsl -d <wsl instance name>
- Install htop
- sudo apt update && apt install htop
Installing htop in a docker desktop WSL instance (Alpine)
I wanted to see what was happening in the WSL instance that runs my Docker containers to see the CPU load and process details.
- Shell into the Docker Desktop wsl instance with
- wsl -d docker-desktop
- Install htop with apk
- apk update && apk add htop
htop in action
- Unlimited screen width
- More detailed CPU and memory graphs
- Color highlighting and text
- Menu at the bottom
This is what htop shows when run on an NVIDIA Workbench WSL instance
top
This is the standard output for the top command run on an NVIDIA workbench WSL instance.
NVIDIA Workbench WSL instance with top
Revision History
Created 2025/05
Comments
Post a Comment