DevHeads.net

/etc/sysconfig/network HOSTNAME settings

Hello,

I found different ways to define the hostname ...

this
HOSTNAME="host.domain.tld"

or this:
HOSTNAME="host"
DOMAIN="domain.tld"

what is the correct way?

Thanks,
Walter

Comments

Re: /etc/sysconfig/network HOSTNAME settings

By Liam O'Toole at 09/04/2016 - 13:57

On 2016-09-03, Walter H. <Walter. ... at mathemainzel dot info> wrote:
In the case of RHEL 5 and 6 the former way is recommended[1]. I don't
know whether that advice has changed with RHEL 7.

1:
<a href="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/ch-Network_Interfaces.html#sect-setting-the-host-name" title="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Deployment_Guide/ch-Network_Interfaces.html#sect-setting-the-host-name">https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6...</a>

Re: /etc/sysconfig/network HOSTNAME settings

By Frank Cox at 09/04/2016 - 15:17

On Sun, 4 Sep 2016 19:57:01 +0100

hostnamectl set-hostname whateveryourhostnameshouldbe