You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
739 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

pkill
===
可以按照进程名杀死进程
## 说明
**pkill命令** 可以按照进程名杀死进程。pkill和killall应用方法差不多也是直接杀死运行中的程序如果您想杀掉单个进程请用kill来杀掉
## 选项
```
pkill(选项)(参数)
```
```
-o仅向找到的最小起始进程号发送信号
-n仅向找到的最大结束进程号发送信号
-P指定父进程号发送信号
-g指定进程组
-t指定开启进程的终端
```
### 参数
进程名称指定要查找的进程名称同时也支持类似grep指令中的匹配模式
## 实例
```
pgrep -l gaim
2979 gaim
pkill gaim
```
也就是说kill对应的是PIDpkill对应的是command