LINUX主机中,有时候我们需要修改系统命名,那么该如何设置呢?我们只需要按照下面的命令操作即可设置。
#hostnamectl set-hostname 新主机名
#bash
示例如下
[root@GM-Zabbix ~]# hostnamectl set-hostname GM-TEST
[root@GM-Zabbix ~]# bash
[root@GM-TEST ~]#
是不是简单又粗暴呢?
LINUX主机中,有时候我们需要修改系统命名,那么该如何设置呢?我们只需要按照下面的命令操作即可设置。
#hostnamectl set-hostname 新主机名
#bash
示例如下
[root@GM-Zabbix ~]# hostnamectl set-hostname GM-TEST
[root@GM-Zabbix ~]# bash
[root@GM-TEST ~]#
是不是简单又粗暴呢?