shell_自动设置主机名

hostnamectl set-hostname $(grep $(hostname -I) /etc/hosts|awk '{print $2}')

你可能感兴趣的:(shell)