当前位置:网站首页>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
边栏推荐
- CJSON内存泄漏的注意事项
- vulnhub之school 1
- 想杀死某个端口进程,但在服务列表中却找不到,可以之间通过命令行找到这个进程并杀死该进程,减少重启电脑和找到问题根源。
- 理财产品要怎么选?新手还什么都不懂
- 【解决】package ‘xxxx‘ is not in GOROOT
- Force buckle 1790 Can two strings be equal by performing string exchange only once
- 力扣 989. 数组形式的整数加法
- Some important knowledge of MySQL
- ASP. Net learning & ASP's one word
- Mongodb learn from simple to deep
猜你喜欢
随机推荐
不落人后!简单好用的低代码开发,快速搭建智慧管理信息系统
恢复持久卷上的备份数据
使用 BR 恢复 Azure Blob Storage 上的备份数据
Jenkins 用户权限管理
华为CE交换机下载文件FTP步骤
Phoenix JDBC
让这个CRMEB单商户微信商城系统火起来,太好用了!
Micro service remote debug, nocalhost + rainbow micro service development second bullet
PHP method of obtaining image information
vulnhub之tre1
Airiot helps the urban pipe gallery project, and smart IOT guards the lifeline of the city
Kubernetes -- detailed usage of kubectl command line tool
TS quick start - Generic
VMWare中虚拟机网络配置
【论文阅读】MAPS: Multi-agent Reinforcement Learning-based Portfolio Management System
怎样用Google APIs和Google的应用系统进行集成(1)—-Google APIs简介
Implement secondary index with Gaussian redis
Force buckle 459 Duplicate substring
实战:sqlserver 2008 扩展事件-XML转换为标准的table格式[通俗易懂]
Graduation season | regretful and lucky graduation season