Specify Node Hostname

Specify Node Hostname

This is an optional step, which details how to specify the node hostname

Description

Command

Description

Command

1

Update the /etc/hosts file

 

NOTE: In the example I use "node01" as my hostname. I'm using the same hostname as my example FQDN:

node01.zentest.win

sudo nano /etc/hosts

 

2

Update the /etc/hostname file

  • Replace the existing hostname with your desired hostname

sudo nano /etc/hostname

 

3

Use systemd services to set the hostname, replacing <HOSTNAME> with your desired hostname

sudo hostnamectl set-hostname <HOSTNAME>

 

4

Reboot the node and log back in as your non-root user to test that the host name has changed

  • You will see the new hostname at your terminal prompt

sudo reboot