美文网首页
Ubuntu 16.04配置静态ip

Ubuntu 16.04配置静态ip

作者: 春風話雨 | 来源:发表于2017-12-26 12:37 被阅读0次

    一、编辑interfaces文件
    sudo gedit /etc/network/interface

    二、在该文件中添加如下语句

    auto lo
    iface lo inet loopback
    
    auto enp3s0
    iface enp3s0 inet static
    
    address 192.168.8.100
    netmask 255.255.255.0
    gateway 192.168.8.2
    dns-nameservers 223.5.5.5 223.6.6.6
    

    本例中用的是阿里的dns速度比较快,编辑interface文件时候,注意enp3s0改成你的网卡,具体可以ipconfig查看

    三、重启网络
    sudo /etc/init.d/networking restart

    相关文章

      网友评论

          本文标题:Ubuntu 16.04配置静态ip

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