Linux命令-hostnamectrl重命名主机名

  • Post author:
  • Post category:linux


NAME
       hostnamectl - Control the system hostname

SYNOPSIS
       hostnamectl [OPTIONS...] {COMMAND}

DESCRIPTION
       hostnamectl may be used to query and change the system hostname and
       related settings.


set-hostname NAME
           Set the system hostname to NAME. 
[fengling@fengling129 ~]$ hostnamectl set-hostname hadoop131

重启之后终端就会显示修改的主机名。



版权声明:本文为qq_27991405原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。