Re: How to set hostname and domainnmae in CentOS 7?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



Not sure about everyone else, but I always put my hostname in /etc/hosts.
Maybe that's from years of not always having DNS available back when the
earth was cooling.


On Apr 5, 2016 16:30, "James Hogarth" <james.hogarth@xxxxxxxxx> wrote:

> On 5 April 2016 at 20:24, Joe Smithian <joe.smithian@xxxxxxxxx> wrote:
>
> > We can permanently set hostname using  hostnamectl set-hostname. How can
> we
> > permanently set *domain name* in CentOS 7?
> > I found an article
> > <
> >
> http://unix.stackexchange.com/questions/239920/how-to-set-the-fully-qualified-hostname-on-centos-7-0
> > >
> > that recommended setting FQDN using hostnamectl. Is that the right way to
> > set hostname and domainname at the same time using *hostnamectl
> > set-hostname* command?
> >
> >  Running *hostnamectl set-hostname* will set the hostname in*
> > /etc/hostname*
> > but it doesn't change */etc/hosts*. What's the proper way of adding
> > hostname and FQDN to */etc/hosts *in CentOS 7?
> >
> >
> Technically speaking one shouldn't put the hostname in /etc/hosts as it's
> not required so long as your DNS is working ... which it should be ...
> _______________________________________________
> CentOS mailing list
> CentOS@xxxxxxxxxx
> https://lists.centos.org/mailman/listinfo/centos
>
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
https://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux