关于 OpenBSD 5.6,假设我在 /etc/myname 中更改主机名
这样做会影响已安装的软件包、root 密码或用户密码吗?
更改主机名后是否必须重新启动计算机?
答案1
您可以更改 /etc/myname 中的条目,其他一切仍将照常工作。不过,您在 /etc/myname 中输入的新主机名只有在重新启动后才会生效。来自 myname 的手册页:
The myname and mygate files are read by netstart(8) at system startup
time.
/etc/myname contains the symbolic name of the host machine. The file
should contain a single line specifying the fully qualified domain name
(FQDN) of the system (e.g. host.example.com). The name must be
resolvable, either by matching a hostname specified in /etc/hosts (see
hosts(5)) or through DNS (see resolv.conf(5)). The hostname is set via
the hostname(1) utility at boot time. See hostname(7) for a description
of hostname resolution.