LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 12-06-2003, 07:02 AM   #1
Fe98
Member
 
Registered: Sep 2003
Distribution: RH9
Posts: 49

Rep: Reputation: 15
How do I stop a program that has crashed?


I'm doing programming and frequently crash the program (well, it freezes). However, it just remains there in my taskbar (what do we call that in Linux?) and I can't close it. How do I stop it? Is there anything like Task Manager in Windows?
 
Old 12-06-2003, 07:06 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
From the command line:

$ ps -ef | grep <program>

Get the associated pid (second field). The grep itself might show up too, ignore that one.

$ kill <pid>

If the process is still there after the above command try

$ kill -9 <pid>

Hope this helps.
 
Old 12-06-2003, 07:38 AM   #3
pablob
Member
 
Registered: Apr 2003
Location: Madrid
Distribution: RHEL, Kubuntu, Solaris, TRU64
Posts: 382

Rep: Reputation: 31
also easy:
Run 'xkill' (from console or KMenu-RunCommand), and point the mouse onto the problematic icon on the taskbar. It will "hiddenly" issue a kill -9 onto the hang process.
 
Old 12-08-2003, 05:07 AM   #4
Fe98
Member
 
Registered: Sep 2003
Distribution: RH9
Posts: 49

Original Poster
Rep: Reputation: 15
Cool thanks alot peeps
 
Old 12-08-2003, 07:09 AM   #5
cjp
Member
 
Registered: Dec 2003
Location: the Netherlands
Distribution: SuSE 9.0
Posts: 54

Rep: Reputation: 15
KILL KILL KILL

Use these on the command line:

ps ax
see which processes are running & which PIDs they have

ps ax | grep <name>
The same; select the lines with name in it

ps
See which processes are running from this console

kill <pid>
Try to terminate the process with PID <pid> in a "normal" way

kill -9 <pid>
Force the death of the process <pid> (the process can't escape here)

xkill
Click on the X window which should be closed & killed

killall <name>
Try to terminate all processes with this name in a "normal" way

killall -9 <name>
Force the death of all processes with this name (YEAH)
 
  


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
How to stop program looping? twirl Programming 5 10-10-2005 06:05 AM
Stop java program(threaded program..should end cleanly) rmanocha Programming 4 11-09-2004 09:36 AM
Crashed program re-appears on evry startup in KDE sfbence Linux - Newbie 1 02-29-2004 12:28 PM
How do i stop a locked program? glenn69 Linux - Newbie 1 09-01-2003 11:33 PM
How to kill program that has crashed? glock19 Linux - General 3 01-11-2002 01:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:02 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