Linux process cannot be killed
When killing a process, as soon as it is killed, another process will be replaced id continues to run. After trying many methods, I found out that the process has a parent process. If I want to end it, I must first end its parent process.
The most common method is to use ps aux, and then use the grep command to filter and find specific processes through the pipeline, and then operate on the specific process. For example ps aux | grep nginx
End the process
Use the kill command kill xxx
Commonly used :kill -9 xx
There is also a killall command, you can directly use the name of the process instead of the process identification number, for example killall -9 name
Unkillable process
Find the parent process first and end the parent process
ps -ef|grep process id (find the parent process)
Then
kill -9 parent process id (end the parent process)
Recommended: linux server tutorial
The above is the detailed content of Linux process cannot be killed. For more information, please follow other related articles on the PHP Chinese website!