hostnamectl方式修改退出重新登录生效。 通过修改/etc/hostname文件方式更改hostname,退出重新登录不生效。 图中可看到新式命令hostnamectl已经识别到新的hostname了,但终端并未更改。 通过文件修改hostname不能立即显示生效--待解决