Results 1 to 4 of 4

Thread: '>' symbol at Terminal

  1. #1
    Join Date
    May 2011
    Location
    India
    Beans
    94
    Distro
    Ubuntu

    Question '>' symbol at Terminal

    Hello!

    Quite a number of times, I follow instructions to do something in Linux. These instructions often involve using the terminal.

    More than once, when I type some command that was instructed (I don't remember the commands exactly) I end up with the terminal showing a new line beginning with '>' ('greater than' symbol) and the cursor blinking right next to it. It's not the usual 'user@machine:' prompt.

    I would like to know what that means. I don't mind a link explaining it. I read a few pages about the terminal for beginners but none of them explain it.

    I would also like to know the proper way to get out of it.

    Thanks!

  2. #2
    Join Date
    Apr 2005
    Location
    Finland/UK
    Beans
    Hidden!
    Distro
    Ubuntu 15.04 Vivid Vervet

    Re: '>' symbol at Terminal

    That's indicating that whatever command you typed wasn't complete, and it's still waiting for you to type the rest of it.

    Most likely that would be a result from mistyping the command you tried to run, or perhaps following instructions from a web site with a layout that splits long commands into several lines (while you should of course type a single command into a single line on a terminal).

    You can just finish whatever command you were trying to run and press enter to complete it, or hit Ctrl-C to cancel everything and return back to the command prompt.

  3. #3
    Join Date
    Apr 2009
    Location
    Midwest, U.S.A.
    Beans
    1,209
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: '>' symbol at Terminal

    Quote Originally Posted by avnd View Post
    It's not the usual 'user@machine:' prompt.

    I would like to know what that means.
    Your USUAL primary prompt is a variable named '$PS1'
    Your secondary prompt is named '$PS2' and it's default setting is the '>' character.

    As stated above it really just means the command interpreter is waiting for a required closing statement to a command.

    An example would be...
    Code:
    if [ $a = b ]; then
        echo 'a equals b'
    fi
    The 'fi' is the closing statement.
    Last edited by AlphaLexman; August 14th, 2011 at 10:01 PM.
    Laptop: Dell Inspiron 8200 - Fedora 13 - Goddard
    Desktop: Self-Built - [Ku, Lu, Xu, U]buntu - Lucid 10.04.3 (LTS)
    Linux User: 498249 / Ubuntu User: 29241

  4. #4
    Join Date
    May 2011
    Location
    India
    Beans
    94
    Distro
    Ubuntu

    Re: '>' symbol at Terminal

    @ McDuck & AlphaLexman: Thank you for your replies.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •