PDA

View Full Version : [ubuntu] Stop application in Terminal



raedbenz
June 6th, 2008, 11:11 AM
HI.,,
how can i stop an application when it run in terminal, what is the command??
for example here the cursor does not write:73118

sayakb
June 6th, 2008, 11:13 AM
Press Ctrl+C to kill the process.

mux
June 6th, 2008, 11:13 AM
HI.,,
how can i stop an application when it run in terminal, what is the command??
for example here the cursor does not write:73118


hi,

try ctrl-c or ctrl-d.

hth,
mux

LinuxIsInnovation was faster... =)

raedbenz
June 6th, 2008, 11:15 AM
Press Ctrl+C to kill the process.
hi
non of them worked...

sayakb
June 6th, 2008, 11:18 AM
How do you invoke this program? From a CLI? You need to be in the CLI itself to issue Ctrl+C.

raedbenz
June 6th, 2008, 11:19 AM
How do you invoke this program? From a CLI? You need to be in the CLI itself to issue Ctrl+C.
HI ..yea thats what i did..i am in the CLI

Rhubarb
June 6th, 2008, 11:21 AM
You could just close the terminal window there.
Press the "X" in the top right hand corner.

raedbenz
June 6th, 2008, 11:24 AM
You could just close the terminal window there.
Press the "X" in the top right hand corner.

hi
lol, if i close the terminal some applications keep running in background.like minicom when if i close the terminal and renter it, and try to run it, i get error msg that application is locked.

any other solution?!

flyingmachete
June 6th, 2008, 11:25 AM
Hi,

I'm a noob, myself, could this work?

open a terminal (applications > accessories) then:

sudo dmesg (will ask for your password)
run the offending program again,
should get a message saying another instance already running. should list the process number, copy the number

open another terminal and then

sudo kill process number

Hope this has been useful

sayakb
June 6th, 2008, 11:25 AM
You could just close the terminal window there.
Press the "X" in the top right hand corner.
LOL.. he's right.. Ctrl+C doesn't seem to work..

EDIT: Closing the terminal should kill the process after a short period.

hyper_ch
June 6th, 2008, 11:25 AM
is this for a usb wifi device?

hyper_ch
June 6th, 2008, 11:27 AM
ps aux | grep APPLICATONNAME


That will then pring the PID of all the stuff that's running as "APPLICATIONNAME" and you just need to kill then the according one:



kill PID


if you don't own the process then you must kill it with sude prepended.

Joshua Netterfield
June 6th, 2008, 11:27 AM
HI.,,
how can i stop an application when it run in terminal, what is the command??
for example here the cursor does not write:73118

If it's really stubborn, you could just close the window...
[ctrl] and [c], both at the same time should work.

If it dosn't work, a more annoying, but more foolproof thing to do is to press [ctrl] and [z] both at the same time, type "ps" (without quotes), find the name of the program which you think you were using, than type "killall -9 NameOfProgram" (without quotes; considering NameOfProgram is the program you were running). It's probably less troublesome to simply close the window though!

sayakb
June 6th, 2008, 11:29 AM
I tried the program myself. Ctrl C/Z/D don't seem to respond.

beanhead
June 6th, 2008, 11:30 AM
I be leave your looking for kill. here is the kill list of commands and what they do.


Killing and Yanking
kill-line (C-k)
Kill the text from point to the end of the line.
backward-kill-line (C-x Rubout)
Kill backward to the beginning of the line.
unix-line-discard (C-u)
Kill backward from point to the beginning of the line. The
killed text is saved on the kill-ring.
kill-whole-line
Kill all characters on the current line, no matter where point
is.
kill-word (M-d)
Kill from point to the end of the current word, or if between
words, to the end of the next word. Word boundaries are the
same as those used by forward-word.
backward-kill-word (M-Rubout)
Kill the word behind point. Word boundaries are the same as
those used by backward-word.
unix-word-rubout (C-w)
Kill the word behind point, using white space as a word bound-
ary. The killed text is saved on the kill-ring.
unix-filename-rubout
Kill the word behind point, using white space and the slash
character as the word boundaries. The killed text is saved on
the kill-ring.
delete-horizontal-space (M-\)
--------------------------------------------------------------------------


If you would like to know more about the shell enter

info bash

and scroll down with your arrow key, the kill commands are at the bottom.

Hope that helps.

raedbenz
June 6th, 2008, 11:30 AM
Hi,

I'm a noob, myself, could this work?

open a terminal (applications > accessories) then:

sudo dmesg (will ask for your password)
run the offending program again,
should get a message saying another instance already running. should list the process number, copy the number

open another terminal and then

sudo kill process number

Hope this has been useful
HI,,
if u have checked the picture at first thread, the cursor doesn't write on the terminal , i am looking for a method to re-activate the cursor and kill the running process.
i also did what u mention and i did not get this msg " saying another instance already running"
it just minicom started working properly but now i have two terminals opened.
thanks

raedbenz
June 6th, 2008, 11:32 AM
I be leave your looking for kill. here is the kill list of commands and what they do.


Killing and Yanking
kill-line (C-k)
Kill the text from point to the end of the line.
backward-kill-line (C-x Rubout)
Kill backward to the beginning of the line.
unix-line-discard (C-u)
Kill backward from point to the beginning of the line. The
killed text is saved on the kill-ring.
kill-whole-line
Kill all characters on the current line, no matter where point
is.
kill-word (M-d)
Kill from point to the end of the current word, or if between
words, to the end of the next word. Word boundaries are the
same as those used by forward-word.
backward-kill-word (M-Rubout)
Kill the word behind point. Word boundaries are the same as
those used by backward-word.
unix-word-rubout (C-w)
Kill the word behind point, using white space as a word bound-
ary. The killed text is saved on the kill-ring.
unix-filename-rubout
Kill the word behind point, using white space and the slash
character as the word boundaries. The killed text is saved on
the kill-ring.
delete-horizontal-space (M-\)
--------------------------------------------------------------------------


If you would like to know more about the shell enter

info bash

and scroll down with your arrow key, the kill commands are at the bottom.

Hope that helps.

Hi,,,
if u have checked the first thread then u will see that the cursor doesn't write on terminal (not active)

Joshua Netterfield
June 6th, 2008, 11:33 AM
Okay.

Open up another terminal. Run

top
Find the application you wanted. Either remember the number (PID) or remember the command.

Close top by pressing "q".

If you remembered the number, run

kill -9 NUMBER
If you remembered the name, run

killall -9 NAME

That's a bit annoying, but it's all I can think of...

raedbenz
June 6th, 2008, 11:39 AM
Okay.

Open up another terminal. Run

top
Find the application you wanted. Either remember the number (PID) or remember the command.

Close top by pressing "q".

If you remembered the number, run

kill -9 NUMBER
If you remembered the name, run

killall -9 NAME

That's a bit annoying, but it's all I can think of...
thanks..
this one worked

sayakb
June 6th, 2008, 11:50 AM
thanks..
this one worked
You don't need to kill the process. After you have closed the terminal, the process will be killed automatically unless you launch it by:

minicom &

vicky.it.bhu
January 25th, 2009, 10:44 AM
hi.,,
how can i stop an application when it run in terminal, what is the command??
For example here the cursor does not write:73118

press ctrl+z

mistypotato
February 6th, 2009, 12:07 AM
Okay.

Open up another terminal. Run

top
Find the application you wanted. Either remember the number (PID) or remember the command.

Close top by pressing "q".

If you remembered the number, run

kill -9 NUMBER
If you remembered the name, run

killall -9 NAME

That's a bit annoying, but it's all I can think of...

This was the ONLY solution that worked for me.
A DEB package installer died during an install and wouldn't close.
This did the trick.

KaisaUbun2
August 22nd, 2012, 11:04 PM
hi
non of them worked...

Pull up the program again in the terminal if it runs in the background.
Open terminal and type


sudo dmesg

then run the program again for instance


sudo Conky

after it shows this process now push Ctr+C and it should have a witty message and say Bye! hope that helps