2

The username column in the output of top command shows a + for the names that are longer than the column width. How can I increase that?

I don't see any option for that.

mahmood
  • 962
  • 7
  • 18
  • 31
  • Yes I know that. The problem exists for `ps` command too. I really do want to see the full string of the username of a process. – mahmood Aug 29 '18 at 15:06

1 Answers1

2

Interesting; there is a way to do it. While running top, use the Shift+X interactive command to widen various fixed-width columns. Giving a parameter of 5 will, for instance, add 5 characters to the USER field, for a total of 13 characters. This ought to display the entire username for most users.

For example:

Before:

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND     
 8736 nm-open+  20   0   74744   7872   6868 S   0.3  0.0   1:28.93 openvpn     

Press Shift+X and enter 5:

width incr is 0, change to (0 default, -1 auto) 5

After:

  PID USER           PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ 
 8736 nm-openvpn     20   0   74744   7872   6868 S   0.4  0.0   1:29.04 

You should resize your terminal to be wider than 80 characters before doing this, or you'll lose information.

Michael Hampton
  • 237,123
  • 42
  • 477
  • 940