Linux skill Command
The Linux skill command sends a signal to running processes. The default signal is TERM (terminate), and commonly used signals include HUP, INT, KILL, STOP, CONT, and 0.
There are three ways to write the signal: -9, -SIGKILL, -KILL. You can use -l or -L to list available signals.
Permission: All users.
Related commands: kill
Syntax
skill [signal to send] [options] selection rules for processes
General Options:
- -f Fast mode/not fully implemented
- -i Interactive mode/each action will be confirmed
- -v Verbose output/list information about selected processes
- -w Smart warning messages/not fully implemented
- -n No action/display process ID
Parameters: Selection rules for processes can be: terminal ID, username, process ID, command name.
- -t Terminal ID (tty or pty)
- -u Username
- -p Process ID (pid)
- -c Command name usable signals
Below is a list of known signal names, signal numbers, and functions.
| Name (Number) | Function/Description |
|---|---|
| ALRM 14 | Exit |
| HUP 1 | Exit |
| INT 2 | Exit |
| KILL 9 | Exit/force close |
| PIPE 13 | Exit |
| POLL | Exit |
| PROF | Exit |
| TERM 15 | Exit |
| USR1 | Exit |
| USR2 | Exit |
| VTALRM | Exit |
| STKFLT | Exit/only for i386, m68k, arm, and ppc hardware |
| UNUSED | Exit/only for i386, m68k, arm, and ppc hardware |
| TSTP | Stop/generate context-dependent behavior |
| TTIN | Stop/generate context-dependent behavior |
| TTOU | Stop/generate context-dependent behavior |
| STOP | Stop/force close |
| CONT | Restart/restart if stopped, otherwise ignore |
| PWR | Ignore/may exit 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/may not be implemented |
| EMT | Core/may not be 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 three users: user1, user2, user3
skill -STOP user1 user2 user3