Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Sometimes (rarely) it happens that when I hit enter on a terminal, the command prompt doesn't go to the next line, but it gets printed again on the same line.

My work around is to simply close the terminal and open a new one. Is there any way to avoid this?

share|improve this question
1  
Is there a way to reproduce it? –  Braiam Nov 8 '13 at 13:29
    
I couldn't find out the cause. I last got this behaviour a few minutes ago when I tried to open ipython and then pressed CTRL+C before it could open, but now I tried again and it works. I don't know, but it's not the first time it happened. –  Ricky Robinson Nov 8 '13 at 13:47
    
I dare to say that your system is just slow... –  Braiam Nov 8 '13 at 13:50

2 Answers 2

Use the reset command.

See man reset:

When invoked as reset, tset sets cooked and echo modes, turns off cbreak and raw modes, turns on newline translation and resets any unset special characters to their default values before doing the terminal initialization described above. This is useful after a program dies leaving a terminal in an abnormal state.

It's useful for lots of situations where the terminal is acting up, like if a script has turned off local echo and died before turning it back on so you can't see what you're typing at the prompt...

share|improve this answer

The next time you have the issue type ctrl+c and it will end the command typed. This may help, let me know what happens.

You also want to make sure what you are typing is being input correctly; that may be why it is catching.

share|improve this answer
    
I typed ctrl+c when it happened... it didn't help. –  Ricky Robinson Nov 8 '13 at 14:56

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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