Debian 11查看IP的命令不再是ifconfig,换成了ip addr。
如果输入ifconfig,会提示命令无法找到。
bash: ifconfig:未找到命令
换成ip addr。
root@GPUServer:/home/laoyang# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether e0:be:03:7e:fd:61 brd ff:ff:ff:ff:ff:ff
inet 192.168.3.133/24 brd 192.168.3.255 scope global dynamic enp3s0
valid_lft 86124sec preferred_lft 86124sec
inet6 fe80::e2be:3ff:fe7e:fd61/64 scope link
valid_lft forever preferred_lft forever
这样就可以查看ip了。