Incorrect commandline history with bash

manish jain unxfbsdi at
Sat Sep 20 18:10:13 UTC 2008


I just migrated from Linux and I am now using FreeBSD 6.3. My keyboard
layout is US-ISO and my TERM is con25. I am using bash#3 as my login shell.
(I installed the bash package from the distribution media, not from

The problem is that bash does not remember my commands correctly. Almost all
commands I enter in a login session are forgotten in the next session. Using
the Up and Down arrow keys navigates a mangled and incomlete command
history. Even using Ctrl-r for a reverse find almost never fetches a command
I had actually typed in previously.

The following are the contents of my .bash_profile and .bashrc:

#.bash_profile :
[ -f ~/.bashrc ] && source ~/.bashrc

#.bashrc :
shopt -s cmdhist
shopt -s histappend

If anyone can help me to get bash remembering my command history correctly,
I will be grateful.
unxfbsdi at

More information about the freebsd-questions mailing list