“Linux 查看端口占用”的版本间的差异

来自姬鸿昌的知识库
跳到导航 跳到搜索
(建立内容为“<syntaxhighlight lang="shell-session"> root@aade5ae73079:/var/www/html# netstat -apn|grep ":443" tcp 0 0 0.0.0.0:443 0.0.0.0:*…”的新页面)
 
 
第1行: 第1行:
 
<syntaxhighlight lang="shell-session">
 
<syntaxhighlight lang="shell-session">
 +
root@raspberrypi:~# lsof -i:80
 +
COMMAND PID USER  FD  TYPE DEVICE SIZE/OFF NODE NAME
 +
chfs    923 root    3u  IPv6  20246      0t0  TCP *:http (LISTEN)
 +
 +
</syntaxhighlight><syntaxhighlight lang="shell-session">
 
root@aade5ae73079:/var/www/html# netstat -apn|grep ":443"
 
root@aade5ae73079:/var/www/html# netstat -apn|grep ":443"
 
tcp        0      0 0.0.0.0:443            0.0.0.0:*              LISTEN      1/apache2  
 
tcp        0      0 0.0.0.0:443            0.0.0.0:*              LISTEN      1/apache2  
 
</syntaxhighlight>
 
</syntaxhighlight>

2023年2月2日 (四) 04:11的最新版本

root@raspberrypi:~# lsof -i:80
COMMAND PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
chfs    923 root    3u  IPv6  20246      0t0  TCP *:http (LISTEN)
root@aade5ae73079:/var/www/html# netstat -apn|grep ":443"
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      1/apache2