Commands.page Logo

How to View Full Command Line in htop on Ubuntu

When managing system resources on Ubuntu, identifying specific processes often requires more than just the process name. The htop interactive process viewer provides a convenient way to inspect running tasks, but the default view may truncate long command lines. This article explains how to configure htop to display the full command line arguments for any process, ensuring you have complete visibility into your system’s activity.

Launch htop

Open your terminal and start the process viewer by typing the following command and pressing Enter:

htop

If htop is not installed, you can install it using sudo apt install htop.

Access the Setup Menu

Once htop is running, press the F2 key on your keyboard. This opens the Setup menu where you can configure display options and columns.

Configure the Command Column

  1. Use the arrow keys to navigate to the Columns tab at the top of the Setup screen.
  2. In the Active columns list on the right, locate COMMAND.
  3. Highlight COMMAND and press the Enter key. This cycles through different display modes for the command column.
  4. Continue pressing Enter until the mode changes to Full command or Full path. This ensures arguments and the complete path are visible.

Enable Program Path (Optional)

For additional clarity, you can enable a global setting to show program paths:

  1. Navigate to the Display options tab in the Setup menu.
  2. Find the option labeled Show program path.
  3. Press the Space bar to check this option.

Save and Exit

Press F10 or Esc to save your changes and return to the main process list. The COMMAND column will now display the full command line used to launch each process, allowing you to see all arguments and scripts involved.