Difference between revisions of "Kill"

From wikieduonline
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
*<code>kill -9 56568</code> or <code>kill -KILL 56568</code> or <code>kill -s KILL 56568</code>
 
*<code>kill -9 56568</code> or <code>kill -KILL 56568</code> or <code>kill -s KILL 56568</code>
  
Send SIGTERM signal
+
Send [[SIGTERM]] signal
*<code>kill -15 56568</code> or <code>kill -TERM 56568</code> or <code>kill -s TERM 56568</code>
+
* <code>[[kill -15]] 56568</code> or <code>kill -TERM 56568</code> or <code>kill -s TERM 56568</code>
  
 
Kill al process that belongs to a user:
 
Kill al process that belongs to a user:
Line 28: Line 28:
 
* <code>[[enable]]</code>: [[enable -n]] kill
 
* <code>[[enable]]</code>: [[enable -n]] kill
 
* [[Builtin]]: [[Bash buildins]]
 
* [[Builtin]]: [[Bash buildins]]
 +
* [[wait]]
  
 
== See also ==
 
== See also ==
 
* {{kill}}
 
* {{kill}}
* kill in Windows is an alias for <code>[[Stop-Process]]</code> cmdlet
+
* kill in Windows is an alias for <code>[[Stop-Process]]</code> [[cmdlet]]
 
* {{jobs (linux)}}
 
* {{jobs (linux)}}
 
* {{ps}}
 
* {{ps}}

Latest revision as of 10:13, 24 May 2023

kill is a command that is used in Linux and other operating systems to send signals to running processes. kill commands allows to send SIGKILL (kill -9 PID) signal that cause the process to terminate immediately (kill).

Linux Examples[edit]

"Kill" a process (send SIGKILL signal)

  • kill -9 56568 or kill -KILL 56568 or kill -s KILL 56568

Send SIGTERM signal

  • kill -15 56568 or kill -TERM 56568 or kill -s TERM 56568

Kill al process that belongs to a user:

  • kill -9 `lsof -t -u USERNAME`
  • Suspend process: kill -SIGSTOP PID
  • Resume process: kill -SIGCONT PID

Jobs:

Related commands[edit]

See also[edit]

Advertising: