In this tutorial, you will learn how to change the history file name. The default value is ~/.bash_history
We can easily change the name of the file by using HISTFILE
variable. The HISTFILE variable holds the name and location of your Bash history file.
export HISTFILE=~/.custom_file
After this change, bash history will be saved in ~/.custom_file instead of the default location.