This is not a function of the terminal app. It is a function of your shell. If, for instance, you are using bash (the default) then your command history is stored in your home directory in a file called .bash_history
I would start by checking that that file exists and has read and write permissions for your user.