Eternal Bash History

Sometimes you need your bash history to store more than the default few hundred commands. Changing the


variable allows you to set the amount of lines you want to store in your history. There are a few other variables you can use to customise but you can find them Here

Changing HISTSIZE to an empty string will allow the history to go on and on and on….

# Eternal bash history.
export HISTSIZE=
export HISTTIMEFORMAT="[%F %T] "
# Change the file location because certain bash sessions truncate .bash_history file upon close.
export HISTFILE=~/.bash_eternal_history
# Force prompt to write history after every command.


Leave a Reply

Your email address will not be published. Required fields are marked *