Bash history is now not saved in .bash_history?

Using Gnome. After recent updates, history is now empty. I saw a large .bash_history existed, but it seems that it is not used and the history is stored somewhere else. The file’s permission was just w, so I gave 600 but that did not fix it. I guess history is stored somewhere else, but where? And why is Bash suddenly using a different place to store it?

Mine is still in ~/.bash_history. I use GNOME, btw.

:bowing_man:t5:

What’s the output of ps -p $$ ?

    PID TTY          TIME CMD
  35612 pts/1    00:00:00 bash

If anything, I am using Tilix, and

image

If I am not mistaken, when you run a command as a non-login shell, it has a default value of 500 for the kept history.

But a login shell doesn’t read .bashrc (if I am not mistaken) but .bash_profile. I wonder if there is a difference regarding to keeping history.

Try adding something like: export HISTFILESIZE=1000 to your .bash_profile and see if it will make any difference.

I have another installation of EOS, on which history working. I checked the permission and the .bash_history file had rw permission. So, I guessed that it really was the reason that the permission was w for some reason, and I might need to reboot the PC to make the terminal to read the file again. So, I rebooted and now I got the history back.

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.