查看主机名:cat /etc/hostname (centos6)
修改主机名:
1、临时修改:hostname newname
2、永久生效:vim /etc/hostname
3、删除主机名:hostnamect1 set-hostname
DNS管理:
vim/etc/NetworkManager/NetworkManager.conf
增加配置:dns=none
vim/etc/resolv,conf
增加以下内容:
#主DNS
nameserver
备dns
nameserver
centos7:本地dns服务配置文件 :/etc/host