Title: $HISTSIZE and $HISTFILE
Course: CIS 121: Linux/UNIX I: Fundamentals ~ For IGNITE Review > Section: Learning Modules

$HISTSIZE

The $HISTSIZE variable determines the number of commands that will be remembered in your current environment. Most distributions default this variable to 500 or 1000. You can change the history size to any value you like.

$HISTFILE

The $HISTFILE variable points to the file that contains your history. The bash shell defaults this value to ~/.bash_history.

paul@debian5:~$ echo $HISTFILE
/home/paul/.bash_history

A session history is saved to this file when you exit the session!

Closing a gnome-terminal with the mouse, or typing reboot as root will NOT save your terminal's history.

(Cobbault, p. 101 102)