Linux通过ifconfig命令ens33没有显示ip地址解决方式
一、问题:登录linux输入ifconfig, ether 00:0c:29:8f:a8:72
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500ether 00:0c:29:8f:a8:72 txqueuelen 1000 (Ethernet)RX packets 245854 bytes 276867993 (264.0 MiB)RX errors 0 dropped 0 overruns 0 frame 0TX packets 257572 bytes 29193635 (27.8 MiB)TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
二、解决方式
重启红框里面的服务
在命令行“reboot”,重启linux,再输入"ifconfig"
[lhh@localhost ~]$ ifconfigens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500inet 192.168.13.128 netmask 255.255.255.0 broadcast 192.168.13.255inet6 fe80::24b5:f6d8:661e:fbed prefixlen 64 scopeid 0x20<link>ether 00:0c:29:8f:a8:72 txqueuelen 1000 (Ethernet)RX packets 55 bytes 5699 (5.5 KiB)RX errors 0 dropped 0 overruns 0 frame 0TX packets 80 bytes 8859 (8.6 KiB)TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536inet 127.0.0.1 netmask 255.0.0.0inet6 ::1 prefixlen 128 scopeid 0x10<host>loop txqueuelen 1 (Local Loopback)RX packets 68 bytes 5916 (5.7 KiB)RX errors 0 dropped 0 overruns 0 frame 0TX packets 68 bytes 5916 (5.7 KiB)TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0virbr0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500inet 192.168.122.1 netmask 255.255.255.0 broadcast 192.168.122.255ether 52:54:00:b1:86:93 txqueuelen 1000 (Ethernet)RX packets 0 bytes 0 (0.0 B)RX errors 0 dropped 0 overruns 0 frame 0TX packets 0 bytes 0 (0.0 B)