suse下查看和修改计算机名

查看hostname

 

修改:
方法1. 通过yast2管理工具进行配置
console中运行yast2工具修改主机名(hostname)
# yast2 network
对于配置未经配置的网卡
"Network cards configuration"
"Network cards configuration"“Configure...”
对于修改已配置网卡的配置
"Network cards configuration"
"Network cards configuration"“Changev...”

“Network address setup”“Detailed settings”单击“Host name and name server”
“Host name”输入框中输入主机名,在“Domain name”中数入域名,假如没有域名,接受缺省的
“local”

 

方法2. 通过修改配置文档的方式并运行命令修改主机名
修改/etc/HOSTNAME文档,在此文档中保存主机名,例如: .
test

然后运行命令配置主机名
# /etc/rc.d/boot.localnet start

 

方法3. 运行 sysctl 动态改变主机名
# sysctl -w kernel.hostname=test

你可能感兴趣的:(server,domain,文档,SuSE,NetWork,工具)