Your Question: How Do I Set the History Size in Linux?
Contents How Do I Change the History Size in Linux? Increase Bash History Size Increase Histsize – the Number of Commands to Remember in the Command History...
Contents
How do I change the history size in Linux?
Increase Bash History Size
Increase HISTSIZE – the number of commands to remember in the command history (the default value is 500). Increase HISTFILESIZE – the maximum number of lines contained in the history file (the default value is 500).
Must Read
How do I make bash history Unlimited?
Setting HISTFILESIZE to a value less than zero causes the history file size to be unlimited (setting it to 0 causes the history file to be truncated to zero size). bash –version to check your bash version. (export PROMPT_COMMAND=’history -a’) can flush commands to bash history immediately.