Commands.page Logo

How to View Parent Process ID PPID in htop Ubuntu

Managing system resources on Ubuntu often requires understanding the relationship between running processes. This article provides a quick guide on configuring the htop process viewer to display the Parent Process ID (PPID) column. By following these steps, you will be able to monitor process hierarchies directly within the interactive interface without needing to rely on external commands or scripts.

Install and Launch htop

If you have not installed htop yet, open your terminal and run the following command:

sudo apt update
sudo apt install htop

Once installed, launch the application by typing htop in your terminal and pressing Enter.

Configure the Display Columns

By default, htop may not show the PPID column. To add it, follow these steps:

  1. Press the F2 key to open the Setup menu.
  2. Use the arrow keys to navigate to the Display options section.
  3. Select Columns and press Enter.
  4. Scroll through the available columns until you find PPID.
  5. Press the F5 key or the + button to add PPID to the active columns list.
  6. Use the F6 key or the arrow buttons to move the PPID column to your preferred position in the list.

Save and Exit

After arranging the columns, press F10 to save your changes and return to the main process view. You will now see the PPID column displayed alongside other process details. This allows you to instantly identify which process spawned any given task on your Ubuntu system.

To exit htop at any time, press F10 or q.