Arch Linux 首次启动后没有 IP

Arch Linux 首次启动后没有 IP

重启后,全新安装的 Arch Linux 没有网络连接。经过一番查找,解决方案如下:

1  # ping -c 4 8.8.8.8  (not found)
2  # ip a  (to find my devise name, in my case: ens33)
3  # systemctl enable dhcpcd@ens33
4  # ip link set ens33 up
5  # ping -c 4 8.8.8.8  (still no joy)
6  # reboot now
7  # ping -c 4 8.8.8.8 (success!!)

我的问题是我现在该如何摆脱重启(第 6 行)?

预先感谢您的帮助。

答案1

您通过执行 正确启用了 systemd 服务systemctl enable dhcpcd@ens33。这会使服务在启动时运行。这就是它在重新启动系统时运行的原因。

您应该systemctl restart dhcpcd@ens33立即执行该服务以使其运行。

相关内容