Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sometime, when i try to do some execution and press ctrl-c , the final output bash would look like this...when i press enter , it won't shift to new line but next to each other. how can i revert it back without creating another bash prompt?

$ kithokit@12:55:42 trunk $ kithokit@12:55:42 trunk $ kithokit@12:55:42 trunk $ kithokit@12:55:42 trunk $ kithokit@12:55:42 trunk $ kithokit@12:55:42 trunk $ kithokit@12:55:42 trunk $ kithokit@12:55:42 trunk $ kithokit@12:55:42 trunk $ kithokit@12:55:43 trunk $ kithokit@12:55:43 trunk $ kithokit@12:55:43 trunk $ kithokit@12:55:43 trunk $ kithokit@12:55:43 trunk $ kithokit@12:55:43 trunk $ kithokit@12:55:43 trunk $ kithokit@12:55:43 trunk $ kithokit@12:55:43 trunk $ kithokit@12:55:44 trunk $ kithokit@12:55:45 trunk $

share|improve this question
add comment

2 Answers

up vote 3 down vote accepted

The reset command will reset your terminal to as clean a state as possible.

share|improve this answer
add comment

$ kithokit@12:55:42 trunk $ kithokit@12:55:42 trunk $ kithokit@12:55:42 trunk $ kithokit@12:55:42 trunk $ kithokit@12:55:42 trunk $ kithokit@12:55:42 trunk $ kithokit@12:55:42 trunk $ kithokit@12:55:42 trunk $ kithokit@12:55:42 trunk $ kithokit@12:55:43 trunk $ kithokit@12:55:43 trunk $ kithokit@12:55:43 trunk $ kithokit@12:55:43 trunk $ kithokit@12:55:43 trunk $ kithokit@12:55:43 trunk $ kithokit@12:55:43 trunk $ kithokit@12:55:43 trunk $ kithokit@12:55:43 trunk $ kithokit@12:55:44 trunk $ kithokit@12:55:45 trunk $

This output displayed becz you changed setting of bash.so if want back without creating another bash prompt you have to change/reset configuration setting

To reset the configuration after it has been messed up, type:

Ctrl-J stty  sane Ctrl-J

Press the Ctrl-J key sequence before and after the command instead of the Enter key. The system usually recognizes the Ctrl-J key sequence when the parameters that control Enter key processing are messed up.

Sometimes the information displayed on the screen may look strange, or the system will not respond when you press the Enter key. This can happen when you use the stty command with parameters that are incompatible or that do things you don't understand. It can also happen when a screen-oriented application ends abnormally and does not have a chance to reset the workstation configuration.

Entering the stty sane command sets a reasonable configuration, but it may differ slightly from your normal configuration.

share|improve this answer
add comment

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.