Skip to the content.

Set Unlimited Bash History

Sometimes, having limited Bash history isn’t enough, and so we can just it unlimited!

Setting HISTSIZE & HISTFILESIZE in ~/.bashrc File

We can set HISTSIZE & HISTFILESIZE variables of Bash to -1 in ~/.bashrc file -

HISTSIZE=-1
HISTFILESIZE=-1

Source: Baeldung Linux