Linux skill command
The Linux skill command sends a signal to a running program. The default signal is TERM (interrupt), and the commonly used signals are HUP, INT, KILL, STOP, CONT, and 0.
Signals can be written in three ways: -9, -SIGKILL, -KILL. You can use -l or -L to list the available signals.
Permissions: All users.
Other related commands: kill
Syntax
skill [signal to send] [options] 选择程序的规则
General parameters:
- -f Fast mode / not yet implemented
- -i Interactive mode / every action will be confirmed
- -v Verbose output / list information about the selected program
- -w Intelligent warning message / not yet implemented
- -n No action / display process IDs
ParametersThe rules for selecting programs can be: terminal ID, user name, process ID, command name.
- -t terminal ID (tty or pty)
- -u user name
- -p process ID (pid)
- -c command name. Available signals
The following lists the known signal names, signal codes, and functions.
| Name (code) | Function / Description |
|---|---|
| ALRM 14 | Terminate |
| HUP 1 | Terminate |
| INT 2 | Terminate |
| KILL 9 | Terminate |
| PIPE 13 | Terminate / force close |
| POLL | Terminate |
| PROF | Terminate |
| TERM 15 | Terminate |
| USR1 | Terminate |
| USR2 | Terminate |
| VTALRM | Terminate |
| STKFLT | Terminate / only applicable to i386, m68k, arm, and ppc hardware |
| UNUSED | Terminate / only applicable to i386, m68k, arm, and ppc hardware |
| TSTP | Stop / produce behavior related to the content |
| TTIN | Stop / produce behavior related to the content |
| TTOU | Stop / produce behavior related to the content |
| STOP | Stop / force close |
| CONT | Restart / restart if in stopped state, otherwise ignore |
| PWR | Ignore / terminate on some systems |
| WINCH | Ignore |
| CHLD | Ignore |
| ABRT 6 | Core |
| FPE 8 | Core |
| ILL 4 | Core |
| QUIT 3 | Core |
| SEGV 11 | Core |
| TRAP 5 | Core |
| SYS | Core / possibly not yet implemented |
| EMT | Core / possibly not yet implemented |
| BUS | Core / core failure |
| XCPU | Core / core failure |
| XFSZ | Core / core failure |
Examples
Stop all processes on PTY devices
skill -KILL -v pts/*
Stop the three users user1, user2, user3
skill -STOP user1 user2 user3Other Extensions
Complete Linux Command List