I am using Ubuntu. From the mongo console I want to repeat the last command so I can modify it before executing it again, same way as I would if I was in the bash Terminal. Normally, I woul开发者_如何转开发d press the up arrow for this, but instead I get a few random characters. Likewise, I would normally press the home key to go to the beginning of the line but instead I get a few random characters. Any ideas on how to make the console behave normally? Perhaps there are alternative function keys?
This sounds weird. Did you install from the mongodb repo, or the default ubuntu/debian one? You should install a current version if you haven't (1.6.5+), using the mongodb repositories.
http://www.mongodb.org/display/DOCS/Ubuntu+and+Debian+packages
The up/down array stuff is handled by the readline library. Is it possible that you have a problem there? Please check to make sure you have it installed.
精彩评论