当前位置:网站首页>You want to kill a port process, but you can't find it in the service list. You can find this process and kill it through the command line to reduce restarting the computer and find the root cause of
You want to kill a port process, but you can't find it in the service list. You can find this process and kill it through the command line to reduce restarting the computer and find the root cause of
2022-07-07 20:21:00 【Mom, I want to eat roasted sweet potato】
One 、windows Kill port process steps
1. View port processes
netstat -ano | find " port "
2. Find the application occupied by the port process
tasklist | find " Process number (pid)"
3. Kill port process
taskkill /pid Process number -t -f
Tips :find " Process number " Equate to findstr Process number ; The process number is PID Number , See the figure below for details
Two 、Linux Kill port process steps
1.linux Find occupied ports
netstat -tln | grep Port number
netstat -tln View port usage , and netstat -tln | grep Port number Only check the usage of the port number
2.linux Find the application occupied by the port process
lsof -i: Port number
3.linux Kill port process
kill -9 PID
3、 ... and 、 Combine commands with pipe symbols
1. kill 8080 Port process
netstat -nlp |grep :8080 |grep -v grep|awk '{print $7}' |awk -F '/' '{print $1}' |xargs kill -9
2. The query contains tomcat The process number of
ps -ef|grep tomcat|grep -v grep|awk '{print $2}'
3. Kill all that contain ‘tomcat’ The process of
ps -ef|grep tomcat|grep -v grep|awk '{print $2}' |xargs kill -9
边栏推荐
- 解决/bin/sh进去的容器运行可执行文件报not found的问题
- Machine learning notes - explore object detection datasets using streamlit
- Yolov6:yolov6+win10--- train your own dataset
- 【网络原理的概念】
- Apifox 接口一体化管理新神器
- Kubernetes -- detailed usage of kubectl command line tool
- Network principle (1) - overview of basic principles
- YoloV6:YoloV6+Win10---训练自己得数据集
- Oracle 存儲過程之遍曆
- AIRIOT助力城市管廊工程,智慧物联守护城市生命线
猜你喜欢
I Basic concepts
【mysql篇-基础篇】事务
ASP.NET学习& asp‘s one word
机械臂速成小指南(十二):逆运动学分析
上海交大最新《标签高效深度分割》研究进展综述,全面阐述无监督、粗监督、不完全监督和噪声监督的深度分割方法
YoloV6:YoloV6+Win10---训练自己得数据集
I wrote a markdown command line gadget, hoping to improve the efficiency of sending documents by garden friends!
vulnhub之school 1
机器学习笔记 - 使用Streamlit探索对象检测数据集
Force buckle 599 Minimum index sum of two lists
随机推荐
Force buckle 1037 Effective boomerang
Traversal of Oracle stored procedures
Flask1.1.4 Werkzeug1.0.1 源码分析:路由
Kubernetes -- detailed usage of kubectl command line tool
力扣 912.排序数组
c语言如何判定是32位系统还是64位系统
力扣 599. 两个列表的最小索引总和
CIS芯片测试到底怎么测?
VMWare中虚拟机网络配置
使用 BR 恢复 Azure Blob Storage 上的备份数据
使用camunda做工作流设计,驳回操作
【解决】package ‘xxxx‘ is not in GOROOT
Oracle 存储过程之遍历
[philosophy and practice] the way of program design
《数字图像处理原理与实践(MATLAB版)》一书之代码Part2[通俗易懂]
School 1 of vulnhub
I Basic concepts
实战:sqlserver 2008 扩展事件-XML转换为标准的table格式[通俗易懂]
机器学习笔记 - 使用Streamlit探索对象检测数据集
2022如何评估与选择低代码开发平台?