当前位置:网站首页>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
边栏推荐
- Flask1.1.4 Werkzeug1.0.1 源码分析:路由
- Deep learning model compression and acceleration technology (VII): mixed mode
- 使用 BR 备份 TiDB 集群数据到 Azure Blob Storage
- 一. 基础概念
- pom. Brief introduction of XML configuration file label function
- 【Auto.js】自动化脚本
- MRS离线数据分析:通过Flink作业处理OBS数据
- Useful win11 tips
- 开发一个小程序商城需要多少钱?
- 【论文阅读】MAPS: Multi-agent Reinforcement Learning-based Portfolio Management System
猜你喜欢
数据孤岛是企业数字化转型遇到的第一道险关
vulnhub之school 1
机器学习笔记 - 使用Streamlit探索对象检测数据集
微服务远程Debug,Nocalhost + Rainbond微服务开发第二弹
Opencv learning notes high dynamic range (HDR) imaging
PHP method of obtaining image information
Implement secondary index with Gaussian redis
【论文阅读】MAPS: Multi-agent Reinforcement Learning-based Portfolio Management System
Opencv学习笔记 高动态范围 (HDR) 成像
School 1 of vulnhub
随机推荐
Yolov6:yolov6+win10--- train your own dataset
pom. XML configuration file label: differences between dependencies and dependencymanagement
测量楼的高度
【网络原理的概念】
ASP. Net learning & ASP's one word
Meta Force原力元宇宙系统开发佛萨奇模式
Cloud component development and upgrading
力扣 989. 数组形式的整数加法
JVM GC garbage collection brief
Solve the problem of incomplete display around LCD display of rk3128 projector
Dachang classic pointer written test questions
备份 TiDB 集群到持久卷
H3C S7000/S7500E/10500系列堆叠后BFD检测配置方法
Solve the problem that the executable file of /bin/sh container is not found
Flask1.1.4 Werkzeug1.0.1 源码分析:路由
Get webkitformboundary post login
JNI 初级接触
How to test CIS chip?
Read PG in data warehouse in one article_ stat
Precautions for cjson memory leakage