I am using bash shell on SUSE Linux Enterprise 10 sp1.
The bash history was disabled by somebody. That means I can't get the previous command by pressing the UP key. I want to enable the command history.
How can I do this?
bash
I am using bash shell on SUSE Linux Enterprise 10 sp1.
The bash history was disabled by somebody. That means I can't get the previous command by pressing the UP key. I want to enable the command history.
How can I do this?
Best Answer
At a Bash prompt, type the following commands and do the steps listed after each one:
If you get "history off" then add this line at the end of your
~/.bashrc
:Next try:
If the first one is blank or
/dev/null
, add this line to the end of your~/.bashrc
:If either of the last two print 0, set them to some number like the default of 500: