http://blog.csdn.net/peterxiaoq/article/details/72912862

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
  
hostnamectl
  
hostnamectl status
  
hostnamectl -static
  
hostnamectl -transient
  
hostnamectl -pretty
  
sudo hostnamectl set-hostname new-host-name