shopt -s histappend shopt -s checkwinsize export HISTCONTROL=ignoredps:ignorespace export HISTTIMEFORMAT='%Y-%m-%d %H:%M:%S ' export EDITOR=vim
histappend: don’t overwrite .bash_history files on each logout; then when someone logs into the server, and messes something up, there’s a vague chance you’ll see what they did. Your history file will obviously grow to be quite big – but suppression of duplicates helps. Mine’s only 900kb after 7 months.
checkwinsize: check the window size after each command, might help some braindead programs cope with you resizing their windows, I guess.
HISTCONTROL: suppress duplicates, ignore spaces
HISTTIMEFORMAT: record a timestamp against each history entry; run ‘history’ to see an example of it’s output…
EDITOR: why would you not use vim?