禁用armbian的netplan - cooip-jm/About-openwrt GitHub Wiki
- 先安装 ifupdown、resolvconf 软件包。
sudo apt install ifupdown resolvconf
- 修改配置文件配置好网络连接。
sudo nano /etc/network/interfaces
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
DHCP 网络配置示例:
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# source /etc/network/interfaces.d/*
# 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 ifdown --force eth0 lo && ifup -a
sudo systemctl enable networking
sudo systemctl restart networking
- 停止、取消和禁止 Netplan 相关服务运行
systemctl disable NetworkManager
systemctl stop NetworkManager