Making ksh history persistent in OpenBSD

January 14, 2009

There’s an environment variable HISTFILE which determines where ksh saves your command history. By default, if HISTFILE is not set, ksh will save to ~/.sh_history. OpenBSD does not, however, include this default – so your command history is lost at the end of each session. That may be what you want, but if not, you can just add a line like this to ~/.profile:
export HISTFILE=~/.sh_history
Since ksh doesn’t include source you can use . ~/.profile to load your changes.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: