Default Location of Linux History File “.bash_history”
Linux puts issued commands into history. History gives previous issued commands. Some times we need to get history file.
History file is located generally in user home directory and named .bash_history
[root@poftut1 ~]# cat .bash_history
dnf remove ansible
dnf install ansible
If it is not there we can see the location by using bash variable.
[root@poftut1 ~]# echo $HISTFILE