1 查看主机名

$ hostname

2 批改主机名

$ hostnamectl set-hostname 主机名$ hostnamectl set-hostname mycomputer