the history command is amazing little tool in the bash shell. when you type the command "history" it gets you .. the history of all the commands you typed in at the prompt. but thats not the only trick it does. you up and down arrow keys also work to let you view your historical commands.
more advanced tricks are covered by this article called "How to get the best out of the history command in GNU/Linux"