LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-26-2012, 04:55 AM   #1
borgy95
Member
 
Registered: Mar 2012
Location: England
Distribution: Debian, Kali, CentOS 7
Posts: 64

Rep: Reputation: Disabled
stuck with > at start of command line?


Using Centos ive come across something ive not seen before - for a newb!

i've logged in and then set about config my nics

after a while i wrote

[root@alexandria} if config

the space between if and config was an error this resulted in all following lines to start with

>
and no matter what command i entered it did nothing and repeated a new line starting

>

how can i ezxit this mode?
what is this > mode for?

thanks
 
Old 04-26-2012, 04:57 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
just hit "Ctrl C". Or type in "fi"

it's just expecting you to continue the "if" statement you accidentally started, so until it sees a "fi" it will keep that block open.
 
1 members found this post helpful.
Old 04-26-2012, 04:58 AM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
Did you try Ctrl+C? > is the conventional prompt indication incomplete input. Ctrl+C should kill the command and allow you to continue.
 
1 members found this post helpful.
Old 04-26-2012, 05:00 AM   #4
borgy95
Member
 
Registered: Mar 2012
Location: England
Distribution: Debian, Kali, CentOS 7
Posts: 64

Original Poster
Rep: Reputation: Disabled
Oww gosh! that really was simple!

haha thanks!
 
Old 04-26-2012, 05:16 AM   #5
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957Reputation: 1957
The character you see is the PS2 prompt, which is the string that the shell prints out for multi-line input.

As the others have pointed out, any command you type that is considered "unfinished" by the shell, such as unpaired quotes or keyword blocks (if..fi, for..done, etc.), results in a new line being provided for you to continue on. Either complete the command as it expects or crtl+c to terminate it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Stuck on GRUB Command Line cg2916 Linux - Newbie 6 03-27-2011 01:50 PM
dell mini 910 ubuntu 8.04 then all of a sudden stuck in grub at line command elicatdaddy Linux - Newbie 4 11-24-2010 09:32 AM
[SOLVED] Stuck at DOS like command line at start up -NOT urgent--and FIXED!! lunardragon Linux - Software 13 11-22-2009 03:41 PM
Stuck in Command Line dfego Slackware - Installation 6 07-05-2006 04:14 AM
Newbie: Stuck at command line. BoardinBum Slackware 9 08-14-2004 03:40 PM


All times are GMT -5. The time now is 09:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration