Out of the box, OpenBSD doesn’t come with a history file set, so when you logoff your history for that session is lost. Here’s how I set the history file and a few favourite aliases. While we’re at it we might as well set the prompt at the same time.

echo "export ENV='$HOME/.kshrc'" >> .profile
# for user:
echo "export PS1='\u@\h:\w$ '" >> .profile
# for root:
echo "export PS1='\u@\h:\w# '" >> .profile

Put the following in .kshrc

HISTFILE="$HOME/.ksh_history"
HISTSIZE=50000
HISTCONTROL=ignoredups:ignorespace
alias l=ls
alias ll="ls -l"
alias la="ls -la"
alias h=history
alias doas="doas "