Results 1 to 10 of 13
is there a keystroke that will kill the current apps that running in the console (its not [Ctrl-C], because other apps can override it) is there one that other apps ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 11-13-2004 #1Linux Newbie
- Join Date
- Oct 2004
- Posts
- 139
how to kill the current app thats running
is there a keystroke that will kill the current apps that running in the console (its not [Ctrl-C], because other apps can override it) is there one that other apps *cant* override???
- 11-13-2004 #2Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
There's no keystroke that sends the KILL signal, but Ctrl+\ sends QUIT, which program more seldomly override, and Ctrl+Z puts the current job in the background. After having put it in the background, you can run "jobs -l" to find out its PID and then kill it manually with a kill signal.
- 11-13-2004 #3Linux User
- Join Date
- Jul 2004
- Location
- USA, Michigan, Detroit
- Posts
- 329
First you have to find the pid for the running proccess.
You do this with this command from either a terminal window in the GUI or at the prompt in a true terminal.
Use this one in a terminal window as you can scroll up and down.
If you are in a true terminal you will need to pipe the out put to another program i.e. less so you can search it.Code:linux:/ # ps -aux
You will get output like this.Code:linux:/ # ps -aux | less
In order to kill the process you must be the owner of the process or root and know pid all of which can be identified from the above information. Also before you kill a process you should make sur you know what that process is doing i.e. you would not kill init as that would be seriously detrimental to the system continuing to run.Code:linux:/ # ps -aux Warning: bad syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 588 240 ? S Nov08 0:05 init [5] root 2 0.0 0.0 0 0 ? SN Nov08 0:00 [ksoftirqd/0] root 3 0.0 0.0 0 0 ? S< Nov08 0:00 [events/0] root 4 0.0 0.0 0 0 ? S< Nov08 0:00 [kblockd/0] root 26 0.0 0.0 0 0 ? S Nov08 0:00 [kapmd] root 28 0.0 0.0 0 0 ? S< Nov08 0:14 [pdflush] root 29 0.0 0.0 0 0 ? S< Nov08 0:08 [pdflush] root 31 0.0 0.0 0 0 ? S< Nov08 0:00 [aio/0] root 30 0.0 0.0 0 0 ? S Nov08 0:11 [kswapd0] root 187 0.0 0.0 0 0 ? S Nov08 0:00 [kseriod]
This is the command you would use to kill a certain process.
If the command is stubborn and still won't die you can force it like this however if it won't die from the first one there maybe a good reason do some more research on the process before just resorting to forcing it.Code:kill "pid #"
Hope this helpsCode:kill -9 "pid #"
Long live the revolution!
Have a nice day.
If you want real change vote Libertarian!
- 11-15-2004 #4Linux Newbie
- Join Date
- Oct 2004
- Posts
- 139
okay, i got back to the command line, but how do i resume the suspended process???
- 11-15-2004 #5Linux Guru
- Join Date
- Oct 2001
- Location
- Täby, Sweden
- Posts
- 7,578
If you mean a process that you suspended with Ctrl+Z, the shell command `fg' should get it back for you. You can have several suspended processes at the same time -- use the `jobs' command to list them. The `bg' and `fg' commands can make them run in the foreground/background (only one can run in the foreground, of course), and kill can kill any of them.
- 11-19-2004 #6Just Joined!
- Join Date
- Nov 2004
- Location
- Louisiana
- Posts
- 2
Re: how to kill the current app thats running
Here is another way to aquirer the PID of a runaway process and successfully kill it using the pipe and grep commands.
Originally Posted by user222
First query the stale "xine" process in a xterm.
Your output should echo back with something similar to this.Code:[jon@raptor jon]$ ps -elf | grep xine
Notice how this instance only three processes were queried instead of a list running of processes. By using this technique should make it easier to locate the process that you are looking for.Once that you have identified the stale "xine" process you can then go ahead and kill the process in the same manner that "Copycon" performed.Code:5 S root 894 1 0 78 0 - 530 schedu Nov18 ? 00:00:00 xinetd -stayalive -reuse -pidfile /var/run/xinetd.pid 0 S jon 13753 1360 1 75 0 - 45950 schedu 13:36 pts/2 00:00:00 xine 0 S jon 13772 13721 0 75 0 - 892 pipe_w 13:37 pts/7 00:00:00 grep xine
- 11-19-2004 #7
Here is how:
1. <Ctrl><Alt><Esc>
2. A skull-like mouse pointer appears.
3. Click on the app you want to terminate.[/url]
- 11-20-2004 #8Linux User
- Join Date
- Jul 2004
- Location
- USA, Michigan, Detroit
- Posts
- 329
The problem with using Ctrl+Alt+Esc is that sometimes that does not actually kill the process it sometimes only kills the window the process is using leaving the stalled process running in the background using resources.
Long live the revolution!
Have a nice day.
If you want real change vote Libertarian!
- 11-20-2004 #9
Yeah, someone wrote exactly that too. I read that the right way to do it is with $kill PID, on a terminal. I tested it and i works, typing top to find out which apps are running.
- 12-07-2004 #10Linux Newbie
- Join Date
- Oct 2004
- Posts
- 139
[Ctrl-Z] can still be overriden by other apps, for example, "twin"; "ytree" and "setedit"
Originally Posted by Dolda2000


Reply With Quote
