[ubuntu-uk] Saving history in the terminal

Mark Einon mark.einon at gmail.com
Wed Oct 31 11:17:27 UTC 2012


On 31 October 2012 11:10, Colin Law <clanlaw at googlemail.com> wrote:
> On 31 October 2012 11:06, scoundrel50agmail <scoundrel50a at gmail.com> wrote:
>> On 21/10/12 18:25, scoundrel50agmail wrote:
>>>
>>> How can I get the history to save in the terminal. Everytime I use it, it
>>> keeps the history of that window, but when I close it, its gone.
>>>
>>>
>> Hi, I posted this a while ago, and still havent been able to work it out,
>> the terminal just does not save any history.....can somebody help?
>
> Did you see Mark's reply?  Did you check out the file ~/.bash_history
> and its permissions?  Is the history getting added to?

I suspect that scoundrel50agmail may not be on the mailing list...so
CCing directly.

My previous reply was:

----
I think you need to be more specific in order for me to understand your problem.

The default behaviour of the bash terminal is to save the history of
the last closed terminal, and any new terminal will start with this
history, which is saved in the file ~/.bash_history.

This means that if you have two or three terminals open, and close
them, only the history of the final closed terminal is kept. Is this
what you are experiencing?

Another issue could be that the file ~/.bash_history is not writeable
by you (e.g. it's owned by root instead).

Cheers,

Mark

----



More information about the ubuntu-uk mailing list