By default the previous 500 commands are saved in the command history list.
HISTSIZE=50;export HISTSIZE
This will keep a history of the fifty (50) most recent commands that you have used.