SUSE修改主机名


方法1)通过修改配置文件的方式并运行命令修改主机名
修改/etc/HOSTNAME文件,在此文件中保存主机名,例如:
linuxserv1
然后运行命令设置主机名
# /etc/rc.d/boot.localnet start
方法2) 通过yast2管理工具进行配置
在console中运行yast2工具修改主机名(hostname)
# yast2 network
     yast2 修改主机名时变更的文件有:
     /etc/sysconfig/SuSEfirewall2
     /etc/sysconfig/windowmanager
     /etc/sysconfig/network/config
     /etc/sysconfig/network/ifcfg-eth0    IP设置
     /etc/hosts.YaST2save
     /etc/init.d/.depend.boot
     /etc/init.d/.depend.start
     /etc/init.d/.depend.stop
     /etc/init.d/.depend.halt
     /etc/postfix
     /etc/postfix/main.cf
     /etc/modprobe.conf.YaST2save
     /etc/modprobe.d/50-ipv6.conf
     /etc/HOSTNAME
     /etc/udev/rules.d/79-yast2-drivers.rules
     /etc/udev/rules.d/70-persistent-net.rules   网卡MAC配置文件
     /etc/modprobe.conf
     /etc/hosts

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

转载于:http://blog.itpub.net/22661144/viewspace-1413424/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值