Table of Contents

  1. bash and bash history settings
    1. Useful link
    2. Immediatly Persist commands to your ~/.bashhistory file
    3. Modify Bash history buffer and file size

TODO bash and bash history settings

https://www.cherryservers.com/blog/a-complete-guide-to-linux-bash-history

Immediatly Persist commands to your ~/.bashhistory file

Add this to ~/.bashrc:

PROMPT_COMMAND='history -a'

Modify Bash history buffer and file size

If the default values of 1,000 command entries in the history buffer and 2,000 entries in the history file isn’t what you want, you can change the $HISTSIZE (buffer) and $HISTFILESIZE (file) environment variables.

For example, to set both to 11,000 entries, modify the default values to read:

HISTSIZE=11000
HISTFILESIZE=11000