Stuck on > prompt in terminal after bad bash command, Ubuntu 10.10

19.5k Views Asked by At

After typing a bad command in terminal like below, the prompt does not exit. Tried Ctrl+c, Ctrl+z, Ctrl+q. Nothing helps to exit > prompt.

[[email protected]|eco9]# vi /etc/lru.cfg'
> 
> vi /etc/lru.cfg
> 
> 
> 
4

There are 4 best solutions below

0
Eugene Yarmash On BEST ANSWER

Bash waits for you to terminate the quoted string with another single quote character. So you can either do 'Enter and exit vi in a normal way, or use Ctrl + C to cancel the command.

">" is the default value of the $PS2 variable, a.k.a secondary prompt string.

0
choroba On

Ctrl + C works for me. Anyway, try adding the closing single quote and Enter.

0
wrwrwr On

How about Ctrl + D, or just ' and Enter (and then :q to exit vi).

0
Shalini Maiti On

Ctrl+ \ will send a SIGQUIT signal. Try that if Ctrl+C (sends a SIGINT signal) does not work.