Keep hostname while using DHCP
If you configured your system to use a certain hostname it is possible that when connecting your system to a network as a dhcp-client that your hostname will be removed.
To keep your original hostname :
Say your primary interface is : eno16777736, then
Create file [ /etc/dhcp/dhclient-eno16777736.conf ]
interface “eno16777736”
{
supersede host-name “<your original hostname>”;
}
Restart your network and your hostname should be remained
Leave a comment