When I hit Page Down in terminal (I'm using Ubuntu 12.04), strangely I get the ~ (tilde) character. This is annoying especially when I searched my command line history and decided to go to the bottom to get my prompt back.

Say, I have 1,351 lines of history. Found what I was looking for in line 869. I could just backspace or Ctrl + C, but I'd much prefer to go to the bottom.

Anyone knows how to change this behavior?

  • Do you want to use PgDn to navigate in the shell history? Or to scroll in the terminal? – Gilles 'SO- stop being evil' Jul 25 '13 at 23:38

Try Shift+Page down or something similar (eg. Ctrl+Alt+Page down).

Page down sends the page down key to the program running inside the terminal. If that's your shell (bash/zsh/whatever), it probably doesn't accept the key combination, and ends up trying to parse the encoded key, which contains ~.

It's more likely you were scrolling in your terminal program itself, using the scroll bar or something similar, so you want a key that your terminal program accepts directly. You didn't specify which program you're using, but Shift+Page down is common. You can also try different modifier key combinations; your terminal's key binding setup might also have more information.

| improve this answer | |
  • <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>Pg Dn</kbd> gives me ;7~ – snoiniM Jul 25 '13 at 15:35

Use Esc> to get to the end of the history. If you do not like the key combination, reconfigure it in ~/.inpurtc.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.