bashterminalubuntu-10.10

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


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.

[root@172.17.148.40|eco9]# vi /etc/lru.cfg'
> 
> vi /etc/lru.cfg
> 
> 
> 

Solution

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