首页 > 代码库 > 修改主机名称

修改主机名称

Hostname

Set the hostname to your liking (e.g. arch):

# echo myhostname > /etc/hostname

Add the same hostname to /etc/hosts:

# nano /etc/hosts
## /etc/hosts: static lookup table for host names##<ip-address>	<hostname.domain.org>	<hostname>127.0.0.1	localhost.localdomain	localhost	myhostname::1		localhost.localdomain	localhost# End of file

From:https://wiki.archlinux.org/index.php/Beginners%27_guide#Hostname