Set FQDN in SET_HOSTNAME

Hello.
How can set FQDN in SET_HOSTNAME inside VM?
I’ve added to context SET_HOSTNAME = $NAME but in this case i get only host name without domain name.

Have you tried this? FQDN in SET_HOSTNAME

It works for me.

Regards,
Harry S.

Yes, i tried, but it’s not working

If the $NAME is server.example.net, then the hostname is set to server and domain search is set to example.net:

  • simple hostname
    root@server:~# hostname
    server
    
  • full name
    root@server:~# hostname -f
    server.example.net
    

You can check the process in net-15-hostname.

1 Like