Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

How do I return to the command line in Ubuntu 12.04 server when all there is, is a line with nothing but a flashing underscore on it. I typed a command wrong and it is stuck like this.

share|improve this question
    
What command did you type wrong? –  Whaaaaaat Mar 14 at 20:42
    
I tried putting a 4 at the end of the ping command like this, ping 8.8.8.8 4, because when I tried ,ping 8.8.8.8, it just kept saying unable to connect to host and kept retrying over and over again and I didn't know how to stop the ping sequence so I just restarted the pc. –  Skateguy Mar 14 at 20:46

1 Answer 1

up vote 1 down vote accepted

Try to press CTRL+Z, you should get a prompt then type bg to resume it but running as a background process.

You can type ps -aef to look for the command PID to eventually kill it:

sudo kill -9 PID_of_your_command
share|improve this answer
    
How can i scroll up through those PIDs. There are too many to fit on one screen. Also which column is the PID? –  Skateguy Mar 14 at 20:51
    
if you can't scroll try a simple pkill ping –  Sylvain Pineau Mar 14 at 20:52
    
Is there any way to make it so I can scroll up through the results? –  Skateguy Mar 14 at 20:55
    
Maybe ps -aef | less –  Sylvain Pineau Mar 14 at 20:57
1  
Ctrl-C is the way to kill a command, or kill PID. kill -9 should be used only as a last resort, because it will not leave the process do the cleanup. –  Rmano Mar 15 at 4:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.