How to View Virtualization and Container IDs in htop
This article provides a straightforward guide on how to configure and
view hardware virtualization status and container IDs within the
htop interactive process viewer in Linux. You will learn
the specific setup steps required to display virtualization types (like
KVM or VMware) and container identifiers (such as Docker or Podman IDs)
directly in your system monitor dashboard.
Displaying Hardware Virtualization Status
When running Linux inside a virtual machine, htop can
detect and display the underlying hypervisor. This information is hidden
by default but can be easily added to your top header meters.
- Launch
htopby typinghtopin your terminal. - Press F2 (or S) to enter the Setup menu.
- Use the arrow keys to navigate down to Meters in the first column.
- Move to the Available meters column (usually the far right) and locate Virtualization.
- Press F5 to add it to the Left column, or F6 to add it to the Right column.
- Press F10 to save and exit the setup.
The top dashboard will now explicitly state your hardware
virtualization status, showing values like none,
kvm, vmware, or xen.
Viewing Container IDs for Running Processes
If you are running containerized applications, you can configure
htop to display the specific container ID associated with
each process. This makes it easy to track down which Docker or Podman
container is consuming system resources.
- Open
htopand press F2 to access the Setup menu. - Select Columns from the first menu column.
- Move to the Available columns list and scroll down to find CONTAINER.
- Press F5 to add it to your Active columns list.
- Use F7 (Move Up) or F8 (Move Down) to position the column where you want it to appear on your screen (e.g., next to the PID or Command column).
- Press F10 to save your changes.
Your process table will now include a dedicated column displaying the unique alphanumeric hash or ID of the container managing that specific process.