My Profile Photo

Sheogorath's Blog

stty sane

Today I learned how to bring back a terminal or console that decided to forget how to properly understand special characters, like a return and instead of considering the command sent, instead it just prints a ^M into the prompt line. The solution is as simple as exiting the prompt by pressing ctrl + c, then type stty sane, hit enter and be back.

I came across this when getting annoyed enough about ^M in a confirmation prompt of Flatpak during updates. With some quick research the people from “Ask Ubuntu” had a useful answer. Further there are some more article and suggestions around the web talking about this topic.