LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 02-16-2005, 08: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, 08:29 AM   #2
overlord73
Member
 
Registered: Apr 2004
Location: ..where no life dwells..
Posts: 541

Rep: Reputation: 30
u can use
ps -eff

have u tried
kill -9 PID ??
 
Old 02-16-2005, 08:36 AM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

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 08:39 AM.
 
  


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

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

All times are GMT -5. The time now is 06:44 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
Open Source Consulting | Domain Registration