0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

[Linux][command] プロセス管理_プロセス終了_kill, killall, pkill, Ctrl + C, Ctrl + Z

Last updated at Posted at 2025-03-30

シグナル名とシグナルID

シグナル名 シグナルID 由来 動作
HUP 1 Hang UP 端末切断の終了
INT
Ctrl+C
2 Interrupt キーボードからの割込み終了
KILL 9 Kill クルーンアップせずに終了
(強制終了)
TERM 15 Terminate クルーンアップして終了
(デフォルト)
CONT 18 Continue 一時停止中のプロセス再開
STOP 19 Stop 一時停止
TSTP
Ctrl+Z
20 Terminal Stop キーボードからの一時停止

プロセスの終了

killコマンド

killコマンド
$ kill -[シグナル名またはシグナルID] PID
$ kill -SIGシグナル名 PID
$ kill -s [シグナル名またはシグナルID] PID

killallコマンド

killコマンド
$ killall -[シグナル名またはシグナルID] プロセス名
$ killall -SIGシグナル名 プロセス名
$ killall -s [シグナル名またはシグナルID] プロセス名

pkill

pkillコマンド
$ pkill -[シグナル名またはシグナルID] プロセス名(正規表現)
$ pkill -s [シグナル名またはシグナルID] プロセス名(正規表現)

Ping-t

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?