zoukankan      html  css  js  c++  java
  • Ubuntu16.04 静态IP配置

    Ubuntu16.04 静态IP配置

    修改配置

    登录系统后,编辑文件/etc/network/interfaces。原始的内容如下:

    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    
    source /etc/network/interfaces.d/*
    
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    auto eno1
    iface eno1 inet dhcp
    # This is an autoconfigured IPv6 interface
    iface eno1 inet6 auto
    

    修改成如下内容:

    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    
    source /etc/network/interfaces.d/*
    
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    auto eno1
    
    iface eno1 inet static
    address 192.168.0.100
    netmask 255.255.255.0
    gateway 192.168.0.254
    
    # This is an autoconfigured IPv6 interface
    iface eno1 inet6 auto
    

    重启网络

    sudo /etc/init.d/networking restart
    
  • 相关阅读:
    正式班D25
    解决oracle用户锁定
    python学习第17天
    python学习第16天
    python学习第15天
    python学习第十四天
    python学习第13天
    Python基础
    python学习第12天
    python学习第11天
  • 原文地址:https://www.cnblogs.com/zhangqunshi/p/6834499.html
Copyright © 2011-2022 走看看