[oclug] Ubuntu client hostname?

Damian Gerow dgerow at afflictions.org
Mon May 4 17:52:15 EDT 2009


Thus spake Andy Civil <andycivil at gmail.com> [Mon, 04 May 2009 16:56:19 -0400]:
: My router tells me which computers have been issued with an IP address with 
: DHCP. My windoze computers and my printer all have their client hostname listed 
: - but my Ubuntu computer doesn't; it seems to be an empty string. How can I set 
: my Ubuntu so that its name appears in the list?

This information is obtained via the optional 'host-name' field in a DHCP
session.  Most OSes send it by default, but the myriad of open-source DHCP
clients don't do this (for whatever reason).  Looks like Ubuntu may not let
you do this a GUI way.

Edit the file /etc/dhcp3/dhclient.conf (it may be called something else).
We're going to be adding the option "send host-name", which may already be
in there -- search the file before you make any changes.  Then update the file
so that the following line is present:

send host-name "ubuntu-pc";

That should fix it up.


More information about the OCLUG mailing list