[WBEL-users] The Terminal Remembers!

Pete Biggs pete@physchem.ox.ac.uk
Tue, 04 Jan 2005 23:11:00 +0000


> 
> I noticed earlier today that my terminal sessions are "remembering" the 
> entries I've typed across sessions (i.e., close one terminal, open 
> another, up-arrow, and there they are).  

It's called a shell history.


> I've searched online, but have 
> obviously not hit on the right keywords just yet - where would one 
> configure the terminal to throw that information away when the session 
> ends?

It depends on the shell you are using.  If it's bash, then you should
look at the environment variables such as 'HISTSIZE', 'HISTFILE' and so
on.  The default history is 500 commands and is stored in
~/.bash_history - 'man bash' IYF.

Similar sorts of things exist for tcsh as well - here I think the
'history' command will do things.

In both shells, typing 'history' will display the current command list.

>   I run some applications with passwords on the command line, so 
> I'd prefer they not stick around after the session.

It's probably not a good idea to put passwords in the command line -
anyone doing 'ps -efw' will be able to see them while the command is
being processed.

>   I'm currently 
> running KDE with KTerm, although I noticed similar behavior with GNOME 
> as well.

It's nothing to do with the window manager - it's a shell thing.

P.

-- 
Pete Biggs :{)        pete @ physchem.ox.ac.uk   pete.biggs @ chem.ox.ac.uk
01865 275490 (Work)   pete1biggs @ gmail.com     pete @ biggs.org.uk