Home » Questions » Computers [ Ask a new question ]

using bash without arrow keys

using bash without arrow keys

I am using bash on a virtual machine. For some reason arrow keys don't work there. Is it possible to use some other key kombination (like HJKL in vi) to move left/right/up/down?

Asked by: Guest | Views: 304
Total answers/comments: 2
Guest [Entry]

"Try this:

set -o vi

Then use Esc and 'hjkl' to navigate.

You can also do this:

set -o emacs

And use ctrl-p, ctrl-n, etc. for navigation.

I have VI mode set in my .bashrc so it's immediately available.

EDIT: here's a cheat sheet for VI mode in Bash. It's a PDF, so consider yourself warned ;)

Here's a cheat sheet for Emacs mode in Bash -- just to cover my bases. It's also a PDF."
Guest [Entry]

The arrow keys on the numpad also work (4,8,6,2) and send a different keycode.