Kill
From FreeBSDwiki
(Difference between revisions)
m (Reverted edits by 83.211.3.16 (Talk); changed back to last version by Jimbo) |
|||
(4 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | [[kill]] -- surprise -- kills processes. You '''must''' supply a [[pid]]. If you want to kill a process by name, look at [[pkill]]. | + | [[kill]] -- surprise -- kills processes. You '''must''' supply a [[pid]]. If you want to kill a process by name, look at [[pkill]] or [[killall]]. |
+ | |||
+ | [[kill]] by itself will cause a process to try to finish what it's doing and save it's state before actually stopping the process, if you pass it the -9 option it will instead kill a process immediately and without waiting or saving any state/information. The [[HUP]] flag will cause the process to re-read it's configuration file (basically a restarting of the process). | ||
+ | |||
+ | ==Flags== | ||
+ | -1 HUP; be careful with this, if used as root, this goes to ALL processes. | ||
+ | -HUP the same as -1 | ||
+ | -6 abort, like doing a control-C | ||
+ | -9 uninterruptible kill -- stop the process NOW | ||
+ | -14 (or -ALRM) "alarm" - not supported by all processes, effect depends on the process | ||
+ | -15 kill politely (save changes, stop when done) | ||
+ | |||
See also [[skill]] | See also [[skill]] | ||
+ | [[Category:System Commands]] |
Latest revision as of 13:11, 5 May 2007
kill -- surprise -- kills processes. You must supply a pid. If you want to kill a process by name, look at pkill or killall.
kill by itself will cause a process to try to finish what it's doing and save it's state before actually stopping the process, if you pass it the -9 option it will instead kill a process immediately and without waiting or saving any state/information. The HUP flag will cause the process to re-read it's configuration file (basically a restarting of the process).
[edit] Flags
-1 HUP; be careful with this, if used as root, this goes to ALL processes. -HUP the same as -1 -6 abort, like doing a control-C -9 uninterruptible kill -- stop the process NOW -14 (or -ALRM) "alarm" - not supported by all processes, effect depends on the process -15 kill politely (save changes, stop when done)
See also skill