Linux skill command

Linux 命令大全Complete Linux Command List

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 14Terminate
HUP 1Terminate
INT 2Terminate
KILL 9Terminate
PIPE 13Terminate / force close
POLLTerminate
PROFTerminate
TERM 15Terminate
USR1Terminate
USR2Terminate
VTALRMTerminate
STKFLTTerminate / only applicable to i386, m68k, arm, and ppc hardware
UNUSEDTerminate / only applicable to i386, m68k, arm, and ppc hardware
TSTPStop / produce behavior related to the content
TTINStop / produce behavior related to the content
TTOUStop / produce behavior related to the content
STOPStop / force close
CONTRestart / restart if in stopped state, otherwise ignore
PWRIgnore / terminate on some systems
WINCHIgnore
CHLDIgnore
ABRT 6Core
FPE 8Core
ILL 4Core
QUIT 3Core
SEGV 11Core
TRAP 5Core
SYSCore / possibly not yet implemented
EMTCore / possibly not yet implemented
BUSCore / core failure
XCPUCore / core failure
XFSZCore / core failure

Examples

Stop all processes on PTY devices

skill -KILL -v pts/*

Stop the three users user1, user2, user3

skill -STOP user1 user2 user3

Linux 命令大全Complete Linux Command List

Other Extensions