Centos change the hostname

Centos change the hostname

1. Check the hosthostname

hostname

2. Change the hostname

hostnamectl set-hostname lz-2

3. Log back

Log on again.

Guess you like

Origin www.cnblogs.com/jimlau/p/12100206.html