Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When i press CTRL+r, the "reaverse-i-search" works well:

enter image description here

but then when i press "arrow up" key, none history commands show, just nothing happens!

Any configuration not compare?

share|improve this question

migrated from stackoverflow.com Sep 1 '12 at 11:37

This question came from our site for professional and enthusiast programmers.

Check for inputrc file in your bash what are the keys are referred in the history search – THANGA Sep 1 '12 at 5:57
"\e[5~": beginning-of-history "\e[6~": end-of-history no idea of what's the meaning? what should i do? – RoyHu Sep 6 '12 at 6:24
up vote 2 down vote accepted

With the reverse search, you need to press Ctrl+r again to do the backwards search.

share|improve this answer
thank you, seems someone making it easier in my previous machine. – RoyHu Sep 25 '12 at 13:55

Currently, you have your Up and Down keys bound to beginning-of-history and end-of-history which, respectively, means:

  • Move to the first line in the history
  • Move to the end of the input history, i.e., the line currently being entered.

If, as your question seems to indicate, the functionality that you are looking for is to move up and down through your history incrementally, you would change these bindings in your .inputrc to history-search-{backward,forward}, like so:

"\e[5~": history-search-backward
"\e[6~": history-search-forward

You can see a list of all of the readline bindings here.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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