38

It there a way to display the complete command line in htop (e.g. in multiple lines or with a moving banner). With the default setting where only one line is displayed it isn't possible to distungish all processes, e.g. different java programs (because class or jar argument follows a bunch of arguments) or programs with long absolute path of binaries.

Omitting the full absolute path in favour of only the binary would be a compromise where distinction would not be optimal, but better in some cases.

I checked out the settings and the manpage and didn't find an option suitable in my understanding.

1
  • 1
    Something like this for p in $(pidof java); do echo $p:; cat /proc/$p/cmdline| xargs -0 echo; done |less to inspect pids commandline?
    – Alex
    Oct 2, 2014 at 19:59

3 Answers 3

46

As far as I know, the only way to show the full command line is to scroll right with the arrow keys or to use a terminal with a small font.

EDIT (thanks to @LangeHaare): You can use Ctrl-A and Ctrl-E to jump to the beginning and end the command line.

5
  • 9
    Do you know whether there's a way to jump to the end and back to the beginning of the command line? Dealing with java command lines containing the complete classpath can lead up to > 2000 signs easily... Oct 2, 2014 at 11:32
  • @Karl To the right end? or down end?
    – tachomi
    Oct 2, 2014 at 13:37
  • @tachomi The right end (and left end, i.e. the view right after start) Oct 2, 2014 at 15:04
  • 11
    @KarlRichter you can use CTRL+A and CTRL+E to go to start and end of the scrolling
    – LangeHaare
    Nov 20, 2017 at 17:11
  • There is a feature request but it has been refused: github.com/hishamhm/htop/issues/233 Mar 21, 2019 at 16:20
7

Just press the w key.

From the help available with F1:

w: wrap process command in multiple lines

1
  • 2
    This should be the accepted answer--at least as of 2021. May 31, 2022 at 15:29
6

ctrl+f and use arrow key to move left and right.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .