2019-03-11 14:44:43 +00:00
|
|
|
# taskkill
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
> 按进程 id 或进程名终止进程。
|
2021-10-01 19:28:01 +01:00
|
|
|
> 更多信息:<https://docs.microsoft.com/windows-server/administration/windows-commands/taskkill>.
|
2019-03-11 14:44:43 +00:00
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 通过进程 id 终止进程:
|
2019-03-11 14:44:43 +00:00
|
|
|
|
2019-10-18 03:33:27 +01:00
|
|
|
`taskkill /pid {{进程 id}}`
|
2019-03-11 14:44:43 +00:00
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 通过进程名终止进程:
|
2019-03-11 14:44:43 +00:00
|
|
|
|
|
|
|
`taskkill /im {{进程名}}`
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 强制终止一个指定的进程:
|
2019-03-11 14:44:43 +00:00
|
|
|
|
|
|
|
`taskkill /pid {{进程名}} /f`
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 终止一个进程及其子进程:
|
2019-03-11 14:44:43 +00:00
|
|
|
|
|
|
|
`taskkill /im {{进程名}} /t`
|
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 终止远程计算机上的进程:
|
2019-03-11 14:44:43 +00:00
|
|
|
|
2019-10-18 03:33:27 +01:00
|
|
|
`taskkill /pid {{进程 id}} /s {{远程主机名}}`
|
2019-03-11 14:44:43 +00:00
|
|
|
|
2021-08-02 09:41:09 +01:00
|
|
|
- 显示命令的帮助信息:
|
2019-03-11 14:44:43 +00:00
|
|
|
|
|
|
|
`taskkill /?`
|