To add this function, make the following changes in the .bashrc file in your user folder:
increase HISTSIZE and HISTFILESIZE to 100000
add the following code:
## Up Arrow: search and complete from previous history
bind '"\e[A":history-search-backward'
## Down Arrow: search and complete from next history
bind '"\e[B":history-search-forward'
If those don't seem to work for you after a restart, try binding \eOA and \eOB instead!
(via: http://jeetworks.org/node/106)