Net-tools

来自姬鸿昌的知识库
跳到导航 跳到搜索

https://net-tools.sourceforge.io/

包含 ifconfig、netstat 等命令

安装

root@15cc59636d4e:/apache-zookeeper-3.8.0-bin# ifconfig
bash: ifconfig: command not found
root@15cc59636d4e:/apache-zookeeper-3.8.0-bin# apt -y install net-tools
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package net-tools
root@15cc59636d4e:/apache-zookeeper-3.8.0-bin# apt update
Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]   
......                                                                                                                                                           
Reading package lists... Done  
root@15cc59636d4e:/apache-zookeeper-3.8.0-bin# apt -y install net-tools
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
......
Unpacking net-tools (1.60+git20181103.0eebece-1ubuntu5) ...
Setting up net-tools (1.60+git20181103.0eebece-1ubuntu5) ...
root@15cc59636d4e:/apache-zookeeper-3.8.0-bin# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.20.0.3  netmask 255.255.0.0  broadcast 172.20.255.255
        ether 02:42:ac:14:00:03  txqueuelen 0  (Ethernet)
        RX packets 5827  bytes 20809653 (20.8 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2043  bytes 112316 (112.3 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 6  bytes 578 (578.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6  bytes 578 (578.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@15cc59636d4e:/apache-zookeeper-3.8.0-bin#