1

I set the hostname.

# more /etc/hostname
kafka01.ocff4.com

The hostname is still as follows.

hostname
kafka01

I restart using the following command.

 systemctl restart systemd-hostnamed

But still, hostname does not show the FQDN.

hostname
kafka01

Why did systemctl restart systemd-hostnamed not take affect? Is it a bug?

Christopher
  • 15,611
  • 7
  • 51
  • 64
yael
  • 12,598
  • 51
  • 169
  • 303

1 Answers1

1

Take a look at your /etc/sysconfig/network file. If your hostname isn't present in the file, place the following line in it: hostname kafka01.ocff4.com

You'll also have to "sudo hostname kafka01.ocff4.com" at the command line to make the change take affect immediatly, or restart to make the change take affect.

L.Ray
  • 469
  • 2
  • 11