linux查看主机名

来源:互联网 发布:牛尔的产品知乎 编辑:程序博客网 时间:2024/05/21 04:17

vi /etc/sysconfig/network

NETWORKING=yes
NETWORKING_IPV6=no
HOSTNAME=IDC-183        //主机名

[root@IDC-183 Release]# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost IDC-183
::1 localhost6.localdomain6 localhost6 IDC-183
[root@IDC-183 Release]# 

[root@IDC-183 Release]# cat /etc/resolv.conf           //设置dns
search IDC-183
nameserver 202.102.192.68
nameserver 202.102.199.62
[root@IDC-183 Release]# 

原创粉丝点击