Skip to main content
added 246 characters in body
Source Link

I know it's been a while but for anyone who's looking for an answer as to why it happens: Some providers (ISP, Company VPNs, etc) send a "Transient hostname" back to the host whenever making a request for an IP via DHCP, and depending on your machine's configuration, it gets set as the current machine's hostname

My problem (and the way I ended up here) was that I had the hostname set as the default localhost and according to the hostnamectl man page:

This tool distinguishes three different hostnames: the high-level "pretty" hostname which might include all kinds of special characters (e.g. "Lennart's Laptop"), the static hostname which is used to initialize the kernel hostname at boot (e.g. "lennarts-laptop"), and the transient hostname which is a default received from network configuration. If a static hostname is set, and is valid (something other than localhost), then the transient hostname is not used.

So a solution would be not to have the hostname set as localhost

Another solution is to make your dhcp configuration in /etc/dhcp/dhclient.conf not to request for a hostname by removing the host-name (and perhaps the domain-name) from the request property

I know it's been a while but for anyone who's looking for an answer as to why it happens: Some providers (ISP, Company VPNs, etc) send a "Transient hostname" back to the host whenever making a request for an IP via DHCP, and depending on your machine's configuration, it gets set as the current machine's hostname

My problem (and the way I ended up here) was that I had the hostname set as the default localhost and according to the hostnamectl man page:

This tool distinguishes three different hostnames: the high-level "pretty" hostname which might include all kinds of special characters (e.g. "Lennart's Laptop"), the static hostname which is used to initialize the kernel hostname at boot (e.g. "lennarts-laptop"), and the transient hostname which is a default received from network configuration. If a static hostname is set, and is valid (something other than localhost), then the transient hostname is not used.

So a solution would be not to have the hostname set as localhost

I know it's been a while but for anyone who's looking for an answer as to why it happens: Some providers (ISP, Company VPNs, etc) send a "Transient hostname" back to the host whenever making a request for an IP via DHCP, and depending on your machine's configuration, it gets set as the current machine's hostname

My problem (and the way I ended up here) was that I had the hostname set as the default localhost and according to the hostnamectl man page:

This tool distinguishes three different hostnames: the high-level "pretty" hostname which might include all kinds of special characters (e.g. "Lennart's Laptop"), the static hostname which is used to initialize the kernel hostname at boot (e.g. "lennarts-laptop"), and the transient hostname which is a default received from network configuration. If a static hostname is set, and is valid (something other than localhost), then the transient hostname is not used.

So a solution would be not to have the hostname set as localhost

Another solution is to make your dhcp configuration in /etc/dhcp/dhclient.conf not to request for a hostname by removing the host-name (and perhaps the domain-name) from the request property

Source Link

I know it's been a while but for anyone who's looking for an answer as to why it happens: Some providers (ISP, Company VPNs, etc) send a "Transient hostname" back to the host whenever making a request for an IP via DHCP, and depending on your machine's configuration, it gets set as the current machine's hostname

My problem (and the way I ended up here) was that I had the hostname set as the default localhost and according to the hostnamectl man page:

This tool distinguishes three different hostnames: the high-level "pretty" hostname which might include all kinds of special characters (e.g. "Lennart's Laptop"), the static hostname which is used to initialize the kernel hostname at boot (e.g. "lennarts-laptop"), and the transient hostname which is a default received from network configuration. If a static hostname is set, and is valid (something other than localhost), then the transient hostname is not used.

So a solution would be not to have the hostname set as localhost