First use the PS-EF command to determine the PID to kill the process, and then enter the following command:
# Kill-pid
Note: The standard KILL command usually achieves the purpose. Terminate the problematic process and release the resources of the process to the system. However, if a process starts a child process and kills only the parent process, the child process is still running and therefore consumes resources. To prevent these so-called "zombie processes", be sure to kill all of their child processes before killing the parent process.
* Determine the PID or ppid to kill the process
# Ps-ef | grep httpd
End Process
# kill-l PID
The-l option tells the kill command to end the process as if the user who started the process has logged off. When this option is used, the kill command attempts to kill the left child process as well. But this command is not always successful-it may still be necessary to manually kill the subprocess before killing the parent process.
Sends a term signal to the parent process, trying to kill it and its child processes.
# kill-term PPID
*killall command
The killall command kills all processes within the same process group. It allows you to specify the name of the process to terminate, not the PID.
# Killall HTTPD
* Stop and restart process
Sometimes you just want to simply stop and restart the process. As follows:
# Kill-hup PID
This command shuts down the Linux gentle execution process and then restarts it immediately. This command is handy when you configure the application, and you can execute this command when you need to restart the process after modifying the configuration file.