zoukankan      html  css  js  c++  java
  • Ubuntu 静态IP

    linux 用了好多年了,每次设置静态ip都上网查,就是记不住。唉~

    cat /etc/network/interfaces
    
    auto lo
    iface lo inet loopback
    
    #auto eth0
    #iface eth0 inet dhcp
    
    auto eth0
    iface eth0 inet static
        address 10.39.249.201
        netmask 255.255.255.0
        gateway 10.39.249.254
    

    设置 DNS

    cat /etc/resolvconf/resolv.conf.d/base 
    nameserver 223.5.5.5
    nameserver 223.6.6.6
    
    sudo resolvconf -u # 生效
    
  • 相关阅读:
    @atcoder
    @loj
    @AGC037
    @uoj
    @uoj
    @loj
    @loj
    @loj
    @loj
    @loj
  • 原文地址:https://www.cnblogs.com/sammei/p/Ubuntu-jing-taiIP.html
Copyright © 2011-2022 走看看