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 Gordon Messmer at 09/06/2016 - 18:47

On 09/04/2016 05:32 AM, Walter H. wrote:

That depends on what release you're using. On CentOS 7, you'd use the
"hostnamectl" command. The sysconfig/network file is no longer used for
that purpose.

Otherwise, consult /usr/share/doc/initscripts/sysconfig.txt