LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-30-2009, 02:35 PM   #1
miros84
Member
 
Registered: Aug 2009
Location: Spain
Distribution: Debian stable, squeeze
Posts: 501

Rep: Reputation: 31
The easiest way to kill some process???


Hello
In windows, pressing control+ald+del you can watch the process and choose someoone and kill it.
In Linux typing
Code:
top
I can watch the process, but I cannot kill them
Which is that the easiest way to kill some process???
 
Old 12-30-2009, 02:41 PM   #2
slacker_et
Member
 
Registered: Dec 2009
Distribution: Slackware
Posts: 138

Rep: Reputation: 27
Yes you can kill processes using top.
You can also use kill and killall.

Use the "k" key in top.
Read the man pages for top, kill, and killall.
ie man top, man kill, man killall.
--ET
 
Old 12-30-2009, 03:37 PM   #3
kellemes
LQ Newbie
 
Registered: Oct 2005
Location: Amsterdam
Distribution: Arch
Posts: 26

Rep: Reputation: 18
Install and use htop.
 
1 members found this post helpful.
Old 12-30-2009, 04:34 PM   #4
miros84
Member
 
Registered: Aug 2009
Location: Spain
Distribution: Debian stable, squeeze
Posts: 501

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by slacker_et View Post
Yes you can kill processes using top.
You can also use kill and killall.

Use the "k" key in top.
Read the man pages for top, kill, and killall.
ie man top, man kill, man killall.
--ET
top -k
top: unknown argument 'k'

Can you give me some example, because I tried and recived this.
 
Old 12-30-2009, 04:37 PM   #5
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Another quick way is: a) if already know the name of the process you want to kill (suppose gmplayer)
Code:
pkill -9 gmplayer
b) if you want a quick and dirty list of your (as user) processes:
Code:
ps -u user
then after selecting the PID of the process to kill from the list
Code:
kill -9 PID
Moreover you can check for a GUI application. I don't know in Debian, but just to make an example, in my opensuse box running KDE I have KSysGuard which list the processes in a way similar to top, but let me kill them just by pressing the KILL button.

Finally, if you want to kill a hanging graphical application you can open a terminal and type
Code:
xkill
press enter,focus the skull pointer onto the window you want to kill and click the mouse left button. A downside of this funny method is that the parent process, the one that forked the graphic app, doesn't die.
 
1 members found this post helpful.
Old 12-30-2009, 04:39 PM   #6
miros84
Member
 
Registered: Aug 2009
Location: Spain
Distribution: Debian stable, squeeze
Posts: 501

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by kellemes View Post
Install and use htop.
I installed this tools. This is very great tools. Thank you.
 
Old 12-30-2009, 04:41 PM   #7
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by miros84 View Post
top -k
top: unknown argument 'k'

Can you give me some example, because I tried and recived this.
The hint by slacker_et was: press "k" when you already are in the top session. Top has a lot of interactive commands (see the manual page for details) "k" being one of them. Press k, then in the "PID to kill:" line near the newly appeared cursor type the PID of the process to kill and press enter.
 
Old 12-30-2009, 04:44 PM   #8
miros84
Member
 
Registered: Aug 2009
Location: Spain
Distribution: Debian stable, squeeze
Posts: 501

Original Poster
Rep: Reputation: 31
Thank you colucix.
I tried your method and it worked for me.
 
Old 12-30-2009, 04:50 PM   #9
miros84
Member
 
Registered: Aug 2009
Location: Spain
Distribution: Debian stable, squeeze
Posts: 501

Original Poster
Rep: Reputation: 31
Oo, that work for te too.
But I see is very dificult to move yourself in the top page...
 
Old 12-30-2009, 04:55 PM   #10
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Quote:
Originally Posted by miros84 View Post
Thank you colucix.
I tried your method and it worked for me.
You're welcome!
Quote:
Originally Posted by miros84 View Post
But I see is very dificult to move yourself in the top page...
It's never easy! (citation)
 
  


Reply



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
bash `kill`: process 'B' silently dies; but process 'A' = `kill` spews back debris! GrapefruiTgirl Programming 9 06-23-2009 09:42 AM
why we cannot kill process id 1 with command "kill -9 1" satyaredhat Linux - Newbie 7 03-11-2009 12:48 PM
How to get the PID of the process giving kill signal to a process? hariprd Programming 2 11-27-2008 03:10 AM
Shell Script : Kill a running process when another process starts ashmew2 Linux - General 3 08-20-2008 03:47 AM
cannot kill process (kill -9 does not work) mazer13a Linux - General 1 05-27-2005 02:32 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:44 AM.

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
Open Source Consulting | Domain Registration