As luck would have it, different terminals handle arrow keys differently, so the brilliant minds behind bash came up with additional methods for accessing and making use of the command history. We'll start with history . This command simply gives you a numbered list of the commands you've entered with the oldest command having the smallest number. In the example above, ps was ran twice, then pwd . By typing just enough to make your history request unique, give you a much better chance of hitting your targeted command.
Bash provides a couple of methods for searching the command history.
Both are useful in different situations. The other method is a tad more complex but also adds flexibilty. The bonus here is that you're able to edit the command line you've searched for before you send it down the line. 22 than it is to muck with ctrl-r type searches or even the arrow keys. If you haven't changed anything, chances are good that a word is a quoted string or a white-space delimited group of characters.