LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-08-2002, 10:00 PM   #1
bripage
Member
 
Registered: Jan 2002
Location: Moorpark
Distribution: SLACK 8!
Posts: 230

Rep: Reputation: 30
How do I kill a proccess?


I run ps aux and see a proccess that I dont want running. How do I end/kill that proccess?
 
Old 08-08-2002, 10:27 PM   #2
jetblackz
Member
 
Registered: Mar 2002
Location: Debian Galaxy
Distribution: Debian
Posts: 711

Rep: Reputation: 30
i.e.

kill -KILL 1337
 
Old 08-08-2002, 10:50 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 250Reputation: 250Reputation: 250
man kill

kill -9 pid will kill with no questions asked.
 
Old 08-08-2002, 10:56 PM   #4
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
and basically KILL and signal 9 are the same thing
 
Old 08-08-2002, 11:06 PM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 250Reputation: 250Reputation: 250
Quote:
Originally posted by neo77777
and basically KILL and signal 9 are the same thing
I suggested the -9 cause its shorter to type, for the lazy people out there like me.
 
Old 08-08-2002, 11:15 PM   #6
neo77777
LQ Addict
 
Registered: Dec 2001
Location: Brooklyn, NY
Distribution: *NIX
Posts: 3,704

Rep: Reputation: 56
I am doing it to, I prefer numbering theme as opposed to holding the shift key and typing the whole signal name I was just showing that there's no difference, so everything is clear.
 
Old 08-09-2002, 04:16 AM   #7
mikek147
Member
 
Registered: Mar 2002
Location: Elyria, Ohio
Distribution: Debian, Nothing else required
Posts: 141

Rep: Reputation: 15
kill(1), without any switches, defaults to kill -15, which signals the process to shut itself down. This is generally the perferable way of shutting down a process, since the process will close all opened files, shutdown down any child processes, and return all resources back to the system. The problem is that not all processes are written to catch signal 15. In those cases, and cases in which a process may get hung up in a loop, you would use kill -9. In this case, the kernel is doing an immediate shutdown of a process. This form of killing is done as a last resort, since not all resources may be returned to the system. -mk
 
Old 08-09-2002, 07:41 AM   #8
LinuxGeek
Member
 
Registered: Jun 2002
Posts: 302

Rep: Reputation: 31
kill `ps -e | awk '/<process-name>/{print $1}'` This is useful because you don't have to know the pid or the exact name of the process. Ex. To kill mozilla, you would do kill `ps -e | awk '/mozilla/{print $1}'`
 
Old 08-09-2002, 08:37 AM   #9
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,671

Rep: Reputation: 218Reputation: 218Reputation: 218
When I don't know a process pid, I prefer pkill. I rather use signal names instead of number, because I have doubts all the time. With names, I won't make a mistake
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
URGENT how to kill a proccess? ivj Linux - Software 5 07-21-2005 01:13 AM
basic proccess acrors Fedora 16 12-03-2004 05:47 PM
automat proccess juanb Linux - Software 1 12-09-2003 07:47 AM
Error waiting proccess.. InDIo Programming 1 07-29-2003 07:37 AM
Proccess checking within shell script khutze Programming 2 08-12-2002 01:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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