ITPub博客

首页 > Linux操作系统 > Linux操作系统 > Change Hostname in Redhat based systems

Change Hostname in Redhat based systems

原创 Linux操作系统 作者:蛋白粉 时间:2010-03-15 17:23:43 0 删除 编辑

Permanent hostname change on RedHat based systems

RedHat based system use the file /etc/sysconfig/network to read the saved hostname at system boot. This is set using the init script. /etc/rc.d/rc.sysinit

/etc/sysconfig/network
NETWORKING=yes
HOSTNAME="plain.domainname.com"
GATEWAY="192.168.0.1"
GATEWAYDEV="eth0"
FORWARD_IPV4="yes"

So in order to preserve your change on system reboot edit this file and enter the appropriate name using the HOSTNAME variable.

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/630461/viewspace-629528/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 练习笔记1
请登录后发表评论 登录
全部评论

注册时间:2007-12-29

  • 博文量
    35
  • 访问量
    29872