Ubuntu 18:
cat /etc/netplan/01-network-manager-all.yaml
# Let NetworkManager manage all devices on this system
network:
version: 2
# renderer: NetworkManager
ethernets:
wlp3s0:
addresses: [192.168.0.113/24]
gateway4: 192.168.0.1
nameservers:
addresses: [8.8.8.8]
运行: netplan apply
Ubuntu 16:
静态:
auto wlp3s0
iface wlp3s0 inet static
address 192.168.0.199
netmask 255.255.255.0
gateway 192.168.0.1
DHCP:
auto enp0s3
iface enp0s3 inet dhcp
博客介绍了Ubuntu 18和Ubuntu 16的网络配置方法。在Ubuntu 18中,通过编辑特定yaml文件并运行netplan apply命令进行配置;Ubuntu 16则分别给出了静态和DHCP两种配置方式的示例。
3万+

被折叠的 条评论
为什么被折叠?



