解决:CentOS 7使用ifconfig命令看不到ens33的信息
原因:系统默认启用了NetworkManager。
解决方案:关闭NetworkManager。
#1.停止NetworkManager
systemctl stop NetworkManager
#2.启用ens33
ifup ens33
#3.重启网络
systemctl restart network.service
#4.永久关闭NetworkManager
systemctl disable NetworkManager
问题解决,此时可以查看ip等信息。
[root@localhost ~]# ifconfig
ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.179.128 netmask 255.255.255.0 broadcast 192.168.179.255
inet6 fe80::20c:29ff:fe98:e39c prefixlen 64 scopeid 0x20<link>
ether 00:0c:29:98:e3:9c txqueuelen 1000 (Ethernet)
RX packets 43262 bytes 51657368 (49.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 10442 bytes 3839231 (3.6 MiB)
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
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 3155 bytes 184799 (180.4 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 3155 bytes 184799 (180.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0