Use the ps or pidof command to find out PID for any program. Step 1 – Find out the PID (process id) of the lighttpd In this example, I am going to kill lighttpd server process. Kill command examples to kill a process on Linux
A PID is automatically assigned to each process when it is created on the system. Each time you start Firefox browser, the system is automatically assigned a unique process identification number (PID). For example, Firefox is a running process if you are browsing the Internet.
To get a full list of signals, type:Ī Linux or Unix process is running instance of a program. However, most users only need to use signal 9 or 15. The kill and killall command support more than 60 signals. It is the default and safest way to kill process. It will not save data or cleaning kill the process. Use SIGKILL as a last resort to kill process.
Use SIGHUP to reload configuration files and open/close log files. SIGHUP (1) – Hangup detected on controlling terminal or death of controlling process.Linux and Unix-like operating system support the standard terminate signals listed below: A list of common Linux or Unix TERM signals