3

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 $

2 Answers 2

4

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

1
  • It's a testament to how stable bash is that this answer doesn't have more up votes.
    – Nate
    Nov 25, 2020 at 14:33
2

$ 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.

You must log in to answer this question.

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