linux如何查看端口被何进程占用
1、lsof -i:端口号
2、netstat -tunlp|grep 端口号
都可以查看指定端口被哪个进程占用的情况
工具/原料
- linux,windows
- xshell
方法/步骤
【步骤一】lsof -i
lsof -i 用以显示符合条件的进程情况,lsof(list open files)是一个列出当前系统打开文件的工具。以root用户来执行lsof -i命令,如下图

【步骤二】lsof -i:端口号
lsof -i:端口号,用于查看某一端口的占用情况,比如查看22号端口使用情况,lsof -i:22,如下图

- 3
【步骤三】netstat -tunlp
netstat -tunlp用于显示tcp,udp的端口和进程等相关情况,如下图

- 4
【步骤四】netstat -tunlp|grep 端口号
netstat -tunlp|grep 端口号,用于查看指定端口号的进程情况,如查看22端口的情况,netstat -tunlp|grep 22,如下图

linux如何查看端口被何进程占用的更多相关文章
- linux如何查看端口被哪个进程占用的方法
linux如何查看端口被哪个进程占用的方法: 1.lsof -i:端口号2.netstat -tunlp|grep 端口号 都可以查看指定端口被哪个进程占用的情况[步骤一]lsof -ilsof -i ...
- linux如何查看端口被哪个进程占用
1.lsof -i:端口号 2.netstat -tunlp|grep 端口号 都可以查看指定端口被哪个进程占用的情况 工具/原料 linux,windows xshell 方法/步骤 [ ...
- linux如何查看端口被哪个进程占用?
参考:https://jingyan.baidu.com/article/546ae1853947b71149f28cb7.html 1.lsof -i:端口号 2.netstat -tunlp|gr ...
- Windows和Linux下如何查看端口被哪个进程占用
Windows: C:/Users/ewanbao>netstat -aon|findstr "123" TCP 127.0.0.1:55123 0.0 ...
- linux查看端口被那个进程占用
linux下遇到端口被暂用了 需要知道是哪个进程 比如80端口 可以这样 netstat -tunlp|
- window系统查看端口被哪个进程占用了
C:\netstat -aon|findstr 8080TCP 127.0.0.1:80 0.0.0.0:0 LISTENING 2448端口被进程号为2448的进程占用,继续执行下面命令:C:\ta ...
- Windows查看端口被哪个进程占用
命令 查看PID: netstat -ano|findstr 端口号 查看进程名称: tasklist|findstr PID 结束进程: taskkill -F -PID PID号 配图详解: 1. ...
- window系统 查看端口 被哪个进程占用了
一.在windows命令行窗口下执行:运行--cmdC:\>netstat -aon|findstr "8080" TCP 127.0.0.1:80 0. ...
- Linux查看端口被哪个进程占用
netstat -lnp|awk 'BEGIN{prt=":443$"}{if ($4 ~ prt) print $0}' 查看443端口
随机推荐
- Impala 使用的端口
下表中列出了 Impala 是用的 TCP 端口.在部署 Impala 之前,请确保每个系统上这些端口都是打开的. 组件 服务 端口 访问需求 备注 Impala Daemon Impala 守护进程 ...
- 自定义针对Product Key处理的TextBox
代码: using System; using System.Collections.Generic; using System.Linq; using System.Text; using Syst ...
- prometheus安装、使用
本文主要参考https://songjiayang.gitbooks.io/prometheus/introduction/what.html 二进制包安装 我们可以到 Prometheus 二进制下 ...
- MVC中使用Castle.Windsor
我在MVC中使用Castle.Windsor是这样用的. 首先在UI层安装Install Castle.Windsor 在App_Start中增加一个类WindsorActivator,用于注册和销毁 ...
- spring boot 2.0 源码分析(四)
在上一章的源码分析里,我们知道了spring boot 2.0中的环境是如何区分普通环境和web环境的,以及如何准备运行时环境和应用上下文的,今天我们继续分析一下run函数接下来又做了那些事情.先把r ...
- vue2.0读书笔记3 - router、vuex
1.vue的应用场景.优势.劣势 优势 通常情况下,运行时效率更高:一个事件循环仅一次视图更新,无频繁的DOM操作: 数据与视图分离,通过管理数据流,控制页面的展现,便于维护.且高效: 数据双向绑定, ...
- 触摸UITextView找到该触摸点的文字
参加了一个比赛有一道题是如标题一样,在UITextView上触摸找到该触摸点对应的文字,比赛也可以查资料,当时做的时候就是抱着玩玩的心态试试也没认真做,就没查就去吃饭去了,昨晚下班回去在思考这个问题发 ...
- Spring Framework’s WebDataBinder
Last week, I was just outside our nation’s capital teaching Spring Web MVC Framework to a wonderful ...
- 监测代码执行时间之Stopwatch
var sw = new System.Diagnostics.Stopwatch(); sw.Start(); 中间为要执行的代码 sw.Stop(); var msg = "上面操作耗时 ...
- Eclipse中让Scala缩进变为4
Windows->preference->Scala->Editor->Formatter->Spaces to indent