Linux Kill Command: Terminate Processes Guide

In Linux, the kill command is used to terminate processes. The basic syntax is:

kill [signal] PID

In this case, signal represents the signal to be sent and PID is the process ID of the process to be terminated.

Commonly used signals include:

  1. 1 (SIGHUP): Restart the process.
  2. Option:
    2 (SIGINT): Interrupt (Ctrl+C)
  3. 9 (SIGKILL): Forced termination
  4. 15 (SIGTERM): Normal termination

I don’t have any plans for the weekend.

kill -9 1234

This will force terminate the process with the process ID 1234.

bannerAds