最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
Dos下查询关闭端口的命令例子
时间:2022-06-30 19:05:50 编辑:袖梨 来源:一聚教程网
1. 查看端口占用
在windows命令行窗口下执行:
netstat -aon|findstr "8080"
TCP 127.0.0.1:80 0.0.0.0:0 LISTENING 2448
端口“8080”被PID(进程号)为2448的进程占用。
查看端口“8080”被哪个应用占用,,继续执行下面命令:
tasklist|findstr "2448"
notepad.exe 2016 Console 0 16,064 K
2. 关闭进程
2.1 按进程号关闭进程
taskkill /pid 2152
多个时格式为:
taskkill /pid 2152 /pid 1284
2.2 按进程名关闭进程
如要关闭notepad.exe,格式为:
taskkill /im notepad.exe
指定多个时格式为:
taskkill /im notepad.exe /im iexplorer.exe
如果是要关闭所有的,则使用通配符*,即:
taskkill /im *.exe
2.3 有提示的关闭进程
taskkill /t /im notepad.exe
taskkill /t /pid 2152
这个效果是提示后在使用者确定后关闭,有提示框。
2.4 强行终止进程
taskkill /f /im notepad.exe
taskkill /f /pid 2152
相关文章
- linux下系统中网页版钉钉加密消息无法查看怎么办? 09-26
- Linux系统怎么关闭不用的进程? 09-26
- linux系统怎么设置终端透明? 09-26
- linux系统怎么录屏? linux录屏软件的使用方法 09-26
- linux怎么关闭开关机音效? 09-26
- linux系统怎么增加swap交换分区? 09-26