With Terminal 2.6.1, when I ssh a linux box, sometimes I don't know why, the two fingers scroll change behavior. Instead of scrolling the command output, it scrolls the command history.

How to exit this mode?

  • Does your ssh session time out before this starts happening? Here's a related discussion... github.com/bpython/bpython/issues/517 (just ignore that it is about bpython).
    – user664833
    Commented Oct 18, 2017 at 23:09
  • 1
    It's a mode (alternate screen) set by the remote to your terminal which is then left on and not set back if you exit the program setting it (like less, or others) unexpectedly (eg disconnect ssh). The command reset will assert to set the initial conditions for your terminal again. I know it has a scary name, feel free to read the man page first.
    – dlamblin
    Commented Apr 3, 2020 at 22:34

2 Answers 2


If you want to exit the history scrolling mode and switch to the command output scrolling mode go to the menu View -> Hide Alternate Screen.

If you want to exit the command output scrolling mode and switch to the history output scrolling mode go to the menu View -> Show Alternate Screen.

When you are in history scrolling mode holding Shift allows you to scroll the command output. The reverse is not true.

This whole behavior can be disabled in

Terminal -> Preferences... -> Profiles -> Keyboard

by unchecking Scroll alternate screen

Under the checkbox, it's indicated:

When the alternate screen is displayed, send input instead of scrolling the terminal view. Press Shift to temporarily reverse this setting.

I still don't know how the history scrolling mode is sometimes accidentally activated.

  • It was accidentally activated here, and your post did the job. +1
    – Niloct
    Commented Apr 30, 2018 at 0:51

I was tracking down the same bug and found the culprit at https://github.com/bpython/bpython/issues/517. If you are using ssh and your connection drops, it will cause scrolling to scroll through your history instead of scrolling the command output. As mentioned in that issue, the fix is to either run the reset command or quit the terminal and launch a new one.

  • 2
    reset worked perfectly for me in iTerm Commented Aug 8, 2019 at 17:18
  • 1
    reset removed some of the command output that I wanted to scroll through which was unfortunate Commented Jun 25, 2020 at 7:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .