In a standard bash shell one can go backwards through the history by hitting the UP key, and forwards by hitting the DOWN key. If you've hit up a bunch and want to get back to the start you can hit ALT + >.

However in Iterm2 if you hit those keys you get "�", and it has no effect on your bash history. Is there any way to send ALT + > in Iterm2, so that if I just hit UP 50 times I can get back to where I was without having to hit DOWN 50 times?


Prefix with Esc, either by hand or you can configure it to use one of the option keys for this:

Screenshot of preferences.

Image source: Setting up Mac OS X and iTerm2 for Emacs, which has some other tips.

You can also get a fresh prompt by pressing Ctrl+C in bash.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.