Skip to content

How to change the History File Name

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.

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments