Binary package “hostname” in ubuntu precise

utility to set/show the host name or domain name

 This package provides commands which can be used to display the system's
 DNS name, and to display or set its hostname or NIS domain name.