查看机器名:linux
#hostname网络
修改机器名:test
redhat中修改主机名配置
第一步:
#hostname oratest
第二步:
修改/etc/sysconfig/network中的hostname
第三步:
修改/etc/hosts文件
network
suse linux:配置文件
修改/etc/HOSTNAME文件,在此文件中保存主机名,例如:
homer100hosts
而后运行命令设置主机名
# /etc/rc.d/boot.localnet start文件
注意:永久性修改机器名:修改系统配置文件co
修改/etc/sysconfig/network //修改这个系统配置文件,才能有效改变机器名
/etc/hosts //hostname命令读这个配置文件redhat
直接修改/etc/hosts文件,系统自己用到主机名的地方不会变化,因此 /etc/hosts 是网络中用的,/etc/sysconfig/network是本机起做用