I was in an SSH session remotely using vim. For some reason, SSH crashed, and I was returned to my home shell. However, whenever I tried to scroll, instead of the terminal scrolling, it printed sets of characters. Also, it's hard to reproduce a single set of characters, because every few seconds, it prints different characters. They are always ASCII characters, like `, ?, a, J, etc.

Toggling the alternate screen does not help, and all my other terminal tabs work fine.

How can I fix this terminal session?

  • For now, I just closed the tab and opened a new one, which works fine, but it would be nice to know.
    – AAM111
    May 25, 2018 at 14:19

1 Answer 1


To fix this, just run the reset command. It will reinitialize the current terminal.

  • Run man reset to see the manual pages for reset.
    – Marius
    May 25, 2018 at 19:05
  • 2
    Solid, but why does this occur? Mar 21, 2020 at 15:28
  • 3
    I think it's a terminal client feature where other codepages can be chosen to draw graphics etc. Basically, a certain sequence of control codes can change your terminal client's mode, and to reset it you need to send some other control codes. reset helps with this. See: stackoverflow.com/questions/17682934/…
    – Marius
    Apr 17, 2020 at 12:15

You must log in to answer this question.

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