美文网首页
Ubuntu设置静态ip

Ubuntu设置静态ip

作者: Hemsl | 来源:发表于2023-08-07 08:35 被阅读0次

    /etc/netplan/00-installer-config.yaml

    # Let NetworkManager manage all devices on this system
    network:
      version: 2
      renderer: networkd
      ethernets:
            eno1:
                    dhcp4: true
                    nameservers:
                            addresses: [223.5.5.5, 114.114.114.114, 8.8.8.8]
            eno2:
                    dhcp4: false
                    addresses: [192.168.1.25/24]
                    gateway4: 192.168.1.1
                    nameservers:
                            addresses: [114.114.114.114, 8.8.8.8]
    

    修改完成后使用netplan apply命令应用网络配置

    相关文章

      网友评论

          本文标题:Ubuntu设置静态ip

          本文链接:https://www.haomeiwen.com/subject/pxqgpdtx.html