5

Linux常用命令-52:kill

 2 years ago
source link: https://xugaoxiang.com/2022/06/15/linux-cmds-52-kill/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

kill 命令用来删除运行中的进程。

语法格式:kill [参数] [进程号]

常用参数:

3fa2b3feb4c2fb65.png
# 列出系统支持的信号,kill命令默认使用的信号是15 SIGTERM
kill -l
02d009098dc559ea.png
# 删除进程,我们需要知道进程的id,也就是pid,pid可以通过ps命令来查看
# 杀死进程号是2000的进程,发送信号9 SIGKILL,强制杀死
kill -9 2000

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK