01 October 2016

Linux: Set Fully Qualified Hostname

On a linux system you may find your hostname is just set tot the computer name e.g.
SVR001

The problem is that this is not a valid fully qualified domain name.

To set a FQDM:
  1. Edit the hostname file:
    vi /etc/hostname
    vi /etc/hosts
  2. Add a suffix to your computer name e.g.
    SVR001.example.com
  3. Restart the hostname service:
    Ubuntu: service hostname restart
    /etc/init.d/hostname.sh start
    CentOS: systemctl restart systemd-hostnamed

No comments:

Post a Comment