How do I clear the GNOME Terminal 2.32.1 cache?

Asked by Dancing Bear

I have discovered that the GNOME Terminal 2.32.1 remembers every single command I've ever given it! I can see this as useful for one session, but this is a bit of a security issue for me. How do I make it stop remembering every command, and how do I clear its cache of old commands? Thanks!

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu gnome-terminal Edit question
Assignee:
No assignee Edit question
Solved by:
Andrew Rendle
Solved:
Last query:
Last reply:
Revision history for this message
Dancing Bear (feeg) said :
#1

PS: I'm using Ubuntu 11.04.

Revision history for this message
mycae (mycae) said :
#2

delete your .bash_history file in your home folder.

Revision history for this message
Best Andrew Rendle (andrew-andrewr) said :
#3

If you want Bash (the shell) to keep the command history during each session but not retain it from one session to the next, add a line
unset HISTFILE
to the .bashrc file in your home folder.

If you don't want it to keep any command history at all during your sessions, add another line
HISTSIZE=0
as well. (If you set this to another number, this will be the maximum number of lines it will remember - the default is 500.)

There are many more settings that you can you to control how Bash stores the command history, these are documented in the Bash manpage, which you can view at http://manpages.ubuntu.com/manpages/natty/en/man1/bash.1.html or by running "man bash" in a terminal.

Revision history for this message
Dancing Bear (feeg) said :
#4

Brilliant! Thank you, so much.