Reset garbled Terminal window on OS X

15

4

I was connected to a linux server over SSH. After performing the following command

cat dmesg.1.gz

the prompt on my SSH session changed from conor@linux:~$ to ␌⎺┼⎺⎼@┌␋┼┤│:·/┌⎺±⎽$

Any text I typed into the terminal was also garbled, even after disconnecting from the SSH session by typing exit, the terminal session which was now with my mac, was still garbled. I resolved the issue by closing the terminal window and opening a new one.

Is there any way to reset the terminal without closing the window and reopening such as a key combination?

conorgriffin

Posted 2010-10-10T01:37:59.050

Reputation: 338

1

Also, see How to correct the unrecongnizable code in my debian?.

– Chris Johnsen – 2010-10-10T03:31:16.623

Answers

20

Your terminal has been shifted into “alternate character set” mode. To shift it back out, type

tput rmacs

at your (garbled) shell prompt. Your typing will appear garbled, too, but it will be back to normal after this command finishes.

Chris Johnsen

Posted 2010-10-10T01:37:59.050

Reputation: 31 786

worked on a Linux terminal too :) – logoff – 2015-04-23T10:44:07.513

Picked this as the best answer because it explained the reason why it happened in addition to resolving the issue. Mr. Mans answer worked too. – conorgriffin – 2010-10-11T17:52:08.650

7

Typing "reset" at the command line (even if you cannot see what you are tying) often helps.

user31752

Posted 2010-10-10T01:37:59.050

Reputation:

6

I have had this same problem. To fix, click on Shell --> Send Reset. And if that doesn't work. Shell --> Hard Reset. This will reset it without you having to close and reopen the terminal.

Wuffers

Posted 2010-10-10T01:37:59.050

Reputation: 16 645

1⌘R — Send Reset – Will – 2014-11-21T17:21:16.210

+1 this is the only solution that worked for me, when something went wrong on the remote side of an ssh connection. – Kelvin – 2012-03-24T22:46:47.437

0

After trying the previous answers without any effect I took a look at the man page: tput reset

antonio

Posted 2010-10-10T01:37:59.050

Reputation: 1