LinuxQuestions.org
Register a domain and help support LQ
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 02-16-2005, 09:24 AM   #1
jawaking00
Member
 
Registered: Mar 2004
Posts: 54

Rep: Reputation: 15
How do you kill programs?


Okay, every once and a while when I try running games through Cedega they hang and I am forced to kill them. Many times this requires switching to a different console and then trying to kill it from there because the game has completely hosed my current X session. The problem is, that most of the time pgrep and pkill don't successfully kill the window that the game was running in, so I am stuck with an ugly window in X and am forced to reboot.

Is there a better way to kill these so that the window actually goes away? Also, is there a better command than pgrep to find the ID of the program? Maybe something that lists the names of all programs running?

Thanks.
 
Old 02-16-2005, 09:29 AM   #2
overlord73
Member
 
Registered: Apr 2004
Location: ..where no life dwells..
Distribution: RH,FC/SuSE/Debian/HPUX/OSX
Posts: 518

Rep: Reputation: 30
u can use
ps -eff

have u tried
kill -9 PID ??
 
Old 02-16-2005, 09:36 AM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

Rep: Reputation: 282Reputation: 282Reputation: 282
I use ps -ef |grep whatever (where whatever is the name of the program you're looking for); this will give you the pid; if there are multiple pids, take the one with the lowest number (the parent process) but make sure that it really belongs to the process that you want to stop as pid might find more than you want. Next I use kill pid. If that's not sufficient, you can use kill -9 pid.

PS: Never heard of pgrep and pkill

Too late

Last edited by Wim Sturkenboom; 02-16-2005 at 09:39 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
What if 'kill -9' fails to kill a task? chii-chan Linux - Newbie 15 03-27-2013 04:47 PM
how to use kill to kill a batch of processes with same name? dr_zayus69 Linux - Software 2 09-03-2005 07:35 PM
cannot kill process (kill -9 does not work) mazer13a Linux - General 1 05-27-2005 03:32 PM
How do I kill programs wellander Linux - General 5 02-07-2005 05:33 PM
Ho to kill locked programs... mooreted Linux - Software 7 02-01-2004 11:28 AM


All times are GMT -5. The time now is 03:46 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration