The kill
command is used to terminate a process. If a program becomes totally
unresponsive, you might be forced to terminate it using this command.
The kill command sends signals to running processes (identified
by their PID) in order to request the termination of the process.
Besides telling a process to end, signals can tell a process to reread
configuration files, pause, continue if stopped.etc. Signals are
represented by different numbers. If you don’t specify the signal, the
default value is 15, which causes the process to exit but allows it to
close open files.
Here is a list of the signals you’re most likely to use and their description:
For example, lets say that we have a program called dd that is using most of the CPU time and we can’t stop it. To kill it with the kill command, first we need to find out the PID of the process. That can be done using the top command:
The top command displays the PID of the process (13203 in this case). To kill the process, we use the kill command. We will use a SIGKILL signal which causes the process to exit without performing routine shutdown tasks:
Here is a list of the signals you’re most likely to use and their description:
For example, lets say that we have a program called dd that is using most of the CPU time and we can’t stop it. To kill it with the kill command, first we need to find out the PID of the process. That can be done using the top command:
The top command displays the PID of the process (13203 in this case). To kill the process, we use the kill command. We will use a SIGKILL signal which causes the process to exit without performing routine shutdown tasks:
Post a Comment