“Linux netstat”的版本间的差异

来自姬鸿昌的知识库
跳到导航 跳到搜索
(Jihongchang移动页面Linux安装netstatLinux netstat
第1行: 第1行:
 +
===安装===
 
<syntaxhighlight lang="shell-session">
 
<syntaxhighlight lang="shell-session">
 
root@aade5ae73079:/var/www/html# apt install -y net-tools
 
root@aade5ae73079:/var/www/html# apt install -y net-tools
第17行: 第18行:
 
Unpacking net-tools (1.60+git20181103.0eebece-1) ...
 
Unpacking net-tools (1.60+git20181103.0eebece-1) ...
 
Setting up net-tools (1.60+git20181103.0eebece-1) ...
 
Setting up net-tools (1.60+git20181103.0eebece-1) ...
 +
</syntaxhighlight>
 +
 +
===查看端口占用===
 +
 +
<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:*              LISTEN      1/apache2
 
</syntaxhighlight>
 
</syntaxhighlight>

2022年8月14日 (日) 06:37的版本

安装

root@aade5ae73079:/var/www/html# apt install -y net-tools
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  net-tools
0 upgraded, 1 newly installed, 0 to remove and 50 not upgraded.
Need to get 250 kB of archives.
After this operation, 1015 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main amd64 net-tools amd64 1.60+git20181103.0eebece-1 [250 kB]
Fetched 250 kB in 3s (99.0 kB/s)                             
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package net-tools.
(Reading database ... 19912 files and directories currently installed.)
Preparing to unpack .../net-tools_1.60+git20181103.0eebece-1_amd64.deb ...
Unpacking net-tools (1.60+git20181103.0eebece-1) ...
Setting up net-tools (1.60+git20181103.0eebece-1) ...

查看端口占用

root@aade5ae73079:/var/www/html# netstat -apn|grep ":443"
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      1/apache2