ubuntu下修改子网掩码

1.修改网络配置

修改 /etc/netplan/01-network-manager-all.yaml 文件

vi /etc/netplan/01-network-manager-all.yaml

# Let NetworkManager manage all devices on this system
network:
  version: 2
  # renderer: NetworkManager
  ethernets:
          enp1s0:
                  addresses: [10.150.154.100/22]
                  gateway4: 10.150.152.1
                  nameservers:
                          addresses: [114.114.114.114]

使用命令生效:
netplan apply

2.作用:修改ubuntu子网掩码 配置ip的命令方法

posted @ 2019-06-18 21:09  zlgSmile  阅读(3018)  评论(0编辑  收藏  举报