修改IP地址:
vi /etc/network/interfaces
/etc/init.d/networking restart
ifdown eth0
ifup eth0
修改主机名:
hostnamectl set-hostname server01 不用重启立即生效,退出重新登录。
vi /etc/hostname
修改DNS:
vi /etc/resolv.conf
vi /etc/resolvconf/resolv.conf.d/base
修改IP地址:
vi /etc/network/interfaces
/etc/init.d/networking restart
ifdown eth0
ifup eth0
修改主机名:
hostnamectl set-hostname server01 不用重启立即生效,退出重新登录。
vi /etc/hostname
修改DNS:
vi /etc/resolv.conf
vi /etc/resolvconf/resolv.conf.d/base
转载于:https://www.cnblogs.com/vincenshen/p/6117041.html