长期配置
确定网卡
配置网卡
sudo vim /etc/netplan/01-network-manager-all.yaml
1
# 01-network-manager-all.yaml # Let NetworkManager manage all devices on this system network: version: 2 renderer: NetworkManager # ============增加如下=================== ethernets: eno1: dhcp4: no addresses: - 192.168.1.138/24 - 192.168.1.139/24 - 192.168.1.140/24 # gateway4: 192.168.1.254 # 这一项好像关键字修改了,不设置也可
输入sudo netplan apply使其生效,重启后ip a即可看到ip已经生效成功。
发表评论