Centos中更改hostname 1.检查主机hostname hostname 2.更改hostname hostnamectl set-hostname lz-2 3.重新登录 重新登录即可。 文章永久链接:https://tech.souyunku.com/34321