Reputation: 1819
I have a FreeBSD box with Bash set up.
I'm used to Debian Linux where my command history is automatically saved when I log out, so that when I log back in I can press up or Ctrl-R or whatever and have access to my history.
How do I set up Bash to do this on FreeBSD?
Upvotes: 7
Views: 6473
Reputation: 109022
Check your environment to make sure the variables HISTSIZE and HISTFILE are set. Make sure HISTSIZE (the number of commands to save) is large enough (I use 10000) and that HISTFILE is writeable. If these variables are not defined, set then in your ~/.bashrc file, logout and log back in.
[EDIT] Also, be sure to check that history is enabled by running:
set -o
and looking for "history":
history on
If history is off
you can turn it on with
set -o history
Upvotes: 10