How to change FQDN ( domain name ) on Ubuntu 20.04 Focal Fossa Linux -

In this tutorial you will learn how to set / change server's Fully Qualified Domain Name (FQDN) on Ubuntu Ubuntu 20.04 Focal Fossa Linux server or desktop
This is a companion discussion topic for the original entry at

Hi :slight_smile:

I try to obtain Hostname and Domain Name from DHCP in Ubuntu 20.04. Both settings are in the lease ( as
option host-name “machine”;
option domain-name “example[dot]org”;

Unfortunately I got only the hostname by executing “hostname -f”

Hi BrassPeddler,

Welcome to our forums.

Try setting your hostname in /etc/hostname to localhost, and reboot.