Default installation of Ubuntu and XUbuntu do not send the hostname to the DHCP server and this prevents other machines on the network from looking up your machine by using the FQDN (Fully Qualified Domain Name). This is easy to fix with a few tweaks to the DHCP configuration file.
Disclaimer: These steps have worked for me and have been tested on Compaq Evo N610c running Ubuntu 8.04 LTS (Hardy Heron) and Compaq Armada M300 running XUbuntu 8.04 LTS (Hardy Heron). YMMV. I am not responsible for loss of data or damage to computers.
1. Open Terminal Window
2. If you already know your hostname skip to step 4
3. To find your hostname run the following command
4. Make a copy of the existing dhclient configuration file
sudo cp /etc/dhcp3/dhclient.conf /etc/dhcp3/dhclient.original
5. Edit the dhclient configuration file
sudo vi /etc/dhcp3/dhclient.conf
6. Search for the line send host-name (On XUbuntu it is missing completely and you will need to add it in)
7. Uncomment the line and replace <hostname> with the hostname identified in step 3. The line should look similar to (don’t leave out the semi-colon at the end)
send host-name "ubuntu-laptop";
8. Save the file and exit gedit
9. Restart networking
sudo /etc/init.d/networking restart
That’s it … test if other machines on the network can now look up your machine by using the FQDN. If you notice something wrong you can always restore the original dhclient configuration file.
The above instructions should work for KUbuntu too although I have not validate it myself.7 comments