永久配置ip地址

#vim /etc/network/interfaces

    修改为
    auto lo
    iface lo inet loopback
    auto eth0
    iface eth0 inet static        配置eth0使用静态地址
    address xxx.xxx.xxx.xxx    配置eth0的固定IP地址
    netmask xxx.xxx.xxx.xxx    配置子网掩码
    gateway xxx.xxx.xxx.xxx    配置网关

重启网络服务
    systemctl restart networking


版权声明:本文为qq_34685860原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。