如何解决 inet 永久不显示的问题?

如何解决 inet 永久不显示的问题?
┌──(root㉿kali)-[~]
└─# ifconfig                                                                                                                                        
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.25.209  netmask 255.255.255.0  broadcast 192.168.25.255
        inet6 fe80::a35b:2f50:7fd4:bcef  prefixlen 64  scopeid 0x20<link>
        ether 00:00:00:00:00:11  txqueuelen 1000  (Ethernet)
        RX packets 22  bytes 2368 (2.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 30  bytes 4066 (3.9 KiB)
        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 4  bytes 240 (240.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4  bytes 240 (240.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

inet 192.168.25.209 netmask 255.255.255.0 broadcast 192.168.25.255一段时间后线路不显示。我必须重新启动网络管理器才能修复它。我在 Windows 10 主机上使用 Oracle VM VirtualBox。

在此日志之后,上述行消失!:

Dec 25 22:03:33 kali NetworkManager[88036]: <info>  [1703522013.1961] dhcp4 (eth0): activation: beginning transaction (timeout in 45 seconds) 
Dec 25 22:03:33 kali NetworkManager[88036]: <info>  [1703522013.2013] dhcp4 (eth0): state changed no lease

答案1

在我看来,你应该在尝试命令@之后尝试这个命令瓦利纳建议:命令为:sudo systemctl restart NetworkManager,该命令帮助您仅重新启动 Network Manager 服务,而不是重新启动整个 Network Manager。

相关内容