skill command is a Linux command that is used to send a signal to a selected process to freeze it. This command is useful when a process is consuming too many resources, and you need to stop it temporarily to free up system resources.
The syntax for the
skill command is as follows:
skill [options] [signal] process_name
skill command can be used to send any signal to a process. However, the default signal is
-STOP, which is used to freeze the process. To use a different signal, you need to specify it using the
Here are some examples of how to use the
- To freeze a process named
firefox, use the following command:
skill -STOP firefox
- To send a
SIGTERMsignal to a process named
httpd, use the following command:
skill -SIGTERM httpd
- To send a
SIGKILLsignal to a process named
mysqld, use the following command:
skill -SIGKILL mysqld
skill command has the following options:
||Display the process ID of the selected process without sending any signal.|
||Verbose mode. Display the process name and signal sent to the process.|
||Specify the user who owns the process.|
||Specify the command name of the process.|
||Wait for the process to terminate before returning.|
||Specify the signal to be sent to the process.|
- If you get an error message saying that the process does not exist, make sure that you have entered the correct process name. You can use the
pscommand to list all running processes and their names.
- If the process does not respond to the signal, you can try using a different signal. Some signals, such as
SIGKILL, cannot be ignored by the process and will force it to terminate.
skillcommand is similar to the
killcommand, but it provides more options for selecting the process to be killed.
skillcommand requires root privileges to send signals to processes owned by other users.
skillcommand can also be used to send signals to multiple processes at once by specifying multiple process names separated by spaces.