Fork me on GitHub

logo我的个人地带

努力每一天,每天进步一点点,每天快乐一点点

ubuntu设置固定IP

进入: /etc/netplan 找到 01-network-manager-all.yaml

命令:sudo vim 01-network-manager-all.yaml

修改:

# Let NetworkManager manage all devices on this system

network:

    version: 2

#  renderer: NetworkManager

    ethernets:

        ens33:

            dhcp4: no

            addresses: [192.168.109.126/24]

            optional: true

            gateway4: 192.168.109.2

            nameservers:

                addresses: [8.8.8.8,8.8.4.4]

注意。冒号后面有空格

命令:sudo netplan apply


Comments 0