Configure A Fully Qualified Domain Name (DNS)

From The World according to Vissie
Jump to navigation Jump to search

We need to change our hostname to be a fully qualified domain name (FQDN). The safe way to do this is to add it to the /etc/hosts file and then edit the /etc/hostname file to reflect the change. Your FQDN if you follow this guide exactly will be dc01-ubuntu.example.local.

sudo vim /etc/hosts

/etc/hosts

127.0.0.1       localhost
127.0.1.1       dc01-ubuntu dc01-ubuntu.example.local
# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
sudo vim /etc/hostname

/etc/hostname

dc01-ubuntu.example.local