bash command-history – Is There a Maximum Size to the Bash History File?

bashcommand history

Can I increase the size of the command history in bash?

Note that I use a Red Hat Linux computer in the undergraduate astrophysics department here (so I don't get that many privileges).

Best Answer

Instead of specifying numbers, you can do

unset HISTSIZE 
unset HISTFILESIZE
shopt -s histappend

in which case only your disk size (and your "largest file limit", if your OS or FS has one) is the limit.

However, be aware that this will eventually slow down bash more and more. see this BashFAQ document and the debian-administration article (original link died, look in a mirror: archive.is and archive.org) for techniques which scale better.