By setting:
export TERM=xterm-256color
you're telling htop
(and every other visual terminal application that uses the termcap or terminfo database) that your terminal is a 256 colour xterm and not a Linux virtual console.
htop
will query the terminfo database to know what sequence of characters is sent upon F1, F2... but will get those for xterm
.
xterm
sends different sequences than the Linux virtual console for those keys which you can verify by querying the terminfo database by hand with infocmp
for instance:
$ infocmp -L1 xterm-256color | grep 'key_f[1-5]='
key_f1=\EOP,
key_f2=\EOQ,
key_f3=\EOR,
key_f4=\EOS,
key_f5=\E[15~,
$ infocmp -L1 linux | grep 'key_f[1-5]='
key_f1=\E[[A,
key_f2=\E[[B,
key_f3=\E[[C,
key_f4=\E[[D,
key_f5=\E[[E,
So htop
will not recognise \E[[A
as a F1, it will expect \EOP
for that.
Here, you don't want to assign values to $TERM
in ~/.bashrc
. $TERM
should be set by the terminal emulators (xterm
, terminator
) themselves, and by getty
for Linux virtual consoles (should be linux
there).
If you're not happy with the value that a particular terminal emulator picks for $TERM
, that's the configuration of that terminal emulators you should update.
Go to setup and change your 'Display' options:
F2 > Display options
Do not hide kernel threads and show custom thread names:
[ ] Hide kernel threads
[x] Show custom thread names
Save:
F10
Best Answer
You can use F3
Search
key to go to next occurrence of the search item. This works regardless of whether you initiate the search with / or F3. Just be sure to avoid pressing Return or else F3 will start a new search instead of continuing the previous one.