禁用armbian的netplan
安装 ifupdown resolvconf,移除 netplan
apt update && apt install ifupdown resolvconf systemctl enable
networking systemctl disable systemd-networkd systemctl disable
systemd-networkd.socket apt remove netplan.io && apt autoremove
禁用 NetworkManager
systemctl stop NetworkManager
systemctl disable NetworkManager
修改网络配置:
/etc/network/interfaces
静态IP:
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1
dns-nameservers 8.8.8.8 8.8.4.4
动态IP:
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
allow-hotplug eth0
iface eth0 inet dhcp
设置 networking 服务开机启动和重启使设置生效:
sudo systemctl enable networking
sudo systemctl restart networking
版权申明
本文系作者 @5240 原创发布在我的回忆录-5240站点。未经许可,禁止转载。
评论