1.ifconfig命令不可用
问题
lele@lele-Virtual-Machine:~$ ifconfig
Command 'ifconfig' not found, but can be installed with:
sudo apt install net-tools
解决
lele@lele-Virtual-Machine:~$ sudo apt install net-tools
安装后再输入命令
lele@lele-Virtual-Machine:~$ ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 172.29.251.35 netmask 255.255.255.240 broadcast 172.29.251.47
inet6 fe80::e994:ca3e:82d7:8767 prefixlen 64 scopeid 0x20<link>
ether 00:15:5d:01:1a:01 txqueuelen 1000 (Ethernet)
RX packets 60868 bytes 84956209 (84.9 MB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 31596 bytes 2375337 (2.3 MB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 1082 bytes 88512 (88.5 KB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1082 bytes 88512 (88.5 KB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
成功获得ip信息。