LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Shell prompt changed to > (https://www.linuxquestions.org/questions/linux-newbie-8/shell-prompt-changed-to-4175449041/)

nicnicman 02-07-2013 12:34 PM

Shell prompt changed to >
 
Hello everyone,

Accidentally, I typed ls -l " at the prompt and suddenly the prompt changed to >.

I'm using a stripped back version of Ubuntu that only includes a command prompt on an Oracle VirtualBox. Unfortunately, I can't get the specific version since the prompt isn't working properly. Of course, I could restart and it would go back to normal, but I would rather do it without restarting.

Thanks.

ntubski 02-07-2013 12:40 PM

You can enter the closing ", or just hit Ctrl+C.

TobiSGD 02-07-2013 12:41 PM

You have opened a quote with typing " and the shell is waiting for you to close it, so just type " again and press Enter.
Alternatively just press Ctrl+c to abort the command.

shivaa 02-07-2013 12:44 PM

Or you can use exit and login again. It will solve the pb.

nicnicman 02-07-2013 12:58 PM

Thanks everyone!

TobiSGD 02-07-2013 01:09 PM

Quote:

Originally Posted by shivaa (Post 4886422)
Or you can use exit and login again. It will solve the pb.

This will not work. The exit command will not be executed as long as the quote is not closed (if it is executed at all, in case of the OP it would not be executed even with a closed quote).

suicidaleggroll 02-07-2013 01:19 PM

As described above, this happens when the shell is waiting for you to finish your command. You'll run into this if you try to execute a command with a lonely quote (single or double), a trailing backslash, or any number of other "incomplete" commands. All you have to do to fix it is close out whatever operation you were running (close the quote, or give the trailing backslash something to delimit, like a space), or just press Ctrl+C to cancel.

colucix 02-07-2013 02:26 PM

Nobody mentioned that it is called secondary prompt and its value is stored in the PS2 environment variable and you can customize it at your pleasure. :twocents:

nicnicman 02-07-2013 04:04 PM

Quote:

Originally Posted by TobiSGD (Post 4886429)
This will not work. The exit command will not be executed as long as the quote is not closed (if it is executed at all, in case of the OP it would not be executed even with a closed quote).

Yeah, this was the first thing I tried...didn't work.

nicnicman 02-07-2013 04:12 PM

Thanks for the additional information, suicidaleggroll and colucix.


All times are GMT -5. The time now is 10:22 PM.