Bash – My bash shell doesn’t start a new line upon Return, and doesn’t show typed command

bashless

In my interactive bash shell run in lxterminal's window, I don't know what I have messed up.

Typing Return key doesn't start a new line, but Ctrl-C will.

$ ^C
$ $ $ $ $ ^C
$ ^C
$ $ $ $ $ $ $ 

When I type a command, although hitting Return key will execute it, the typed command is not visible.

Before that happened, I was running some command sudo lsof ... | less (or sudo netstat ... | less), and there seemed no output, so I hit ctrl-c and/or q multiple times in an arbitrary order. When I finally got out of less, that problem with bash happened.

Did I accidentally redirect the stdout of the shell somewhere else?

I don't want to close the shell, so is there some way to fix the problem? Thanks.

Best Answer

I think your terminal may be stuck in a “funny” mode. You probably can reset it with the /usr/bin/reset command, that normally comes with the ncurses library.

Related Question