Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

Linux skill command

Linux skill command

Linux Command Reference Linux Command Reference

The Linux skill command sends a signal to running programs; the default signal is TERM (interrupt), and more 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 required: all users.

Other related command: kill

Syntax

skill [signal to send] [options] 选择程序的规则

General parameters:

Parameters: The rules for selecting programs can be: terminal ID, username, program ID, command name.

The following lists the known signal names, signal numbers, and functions.

Name (number) Function/Description
ALRM 14 Exit
HUP 1 Exit
INT 2 Exit
KILL 9 Exit/Forced close
PIPE 13 Exit
POLL Exit
PROF Exit
TERM 15 Exit
USR1 Exit
USR2 Exit
VTALRM Exit
STKFLT Exit/Only applies to i386, m68k, arm, and ppc hardware
UNUSED Exit/Only applies to i386, m68k, arm, and ppc hardware
TSTP Stop/Generate a behavior related to the content
TTIN Stop/Generate a behavior related to the content
TTOU Stop/Generate a behavior related to the content
STOP Stop/Forced close
CONT Restart/If in a stopped state, restart; otherwise ignore
PWR Ignore/On some systems, exits
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 yet be implemented
EMT Core/May not yet be implemented
BUS Core/Core dump failed
XCPU Core/Core dump failed
XFSZ Core/Core dump failed

Example

Stop all programs on PTY devices

skill -KILL -v pts/*

Stop the three users user1, user2, user3

skill -STOP user1 user2 user3

Linux Command Reference Linux Command Reference