vi or your text editor of choice. Though there should be a 'domainname' command to set it as well, though I just prefer editing /etc/hosts directly.
On Tue, Apr 5, 2016 at 3:24 PM, Joe Smithian joe.smithian@gmail.com 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-qualifie...
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?
Thanks,
Joe _______________________________________________ CentOS mailing list CentOS@centos.org https://lists.centos.org/mailman/listinfo/centos