# kill ## Command Function This command is used to send a specific signal to a specified process. ## Syntax kill \[_signo_ | _-signo_\] \[_pid_\] ## Parameters **Table 1** Parameter description

Parameter

Description

Value Range

signo

Specifies the signal ID.

[1,30]

pid

Specifies the process ID.

[1,MAX_INT]

>![](../public_sys-resources/icon-notice.gif) **NOTICE:** >The valid range of the **signo** value is \[0, 64\], and the recommended value range is \[1, 30\]. Other values in the valid range are reserved. ## Usage The **signo** and **pid** parameters are mandatory. The **pid** value range varies depending on the system configuration. For example, if the maximum **pid** value supported by the system is **256**, this value range is \[1-256\]. ## Example 1. Query the process list and determine the PID \(7\) of the process to be killed. **Figure 1** Querying PIDs ![](figure/querying-pids.png "querying-pids") 2. Run **kill 14 7** to send signal 14 \(the default behavior of **SIGALRM** is to terminate the process\) to process 7 **helloworld\_d** \(user-space\). Then query the current process list. Process 7 has been terminated. The result of the **kill 14 7** command is the same as that of the **kill -14 7** command. **Figure 2** Command output ![](figure/command-output.png "command-output") ## Output The command output is as follows: **Figure 3** Sending a signal to a specified process ![](figure/sending-a-signal-to-a-specified-process.png "sending-a-signal-to-a-specified-process") The signal is successfully sent if no error is reported. **Figure 4** Signal sending failure ![](figure/signal-sending-failure.png "signal-sending-failure") The signal fails to send due to invalid parameters. Check the signal ID and PID for fault.