ubuntu set host name
http://wiki.joyent.com/wiki/display/jpc2/Setting+the+Host+Name+on+a+Linux+VM
- Set the host name in the /etc/hostname file:
echo"ubuntu.example.com"> /etc/hostname - Using any text editor, edit the file /etc/hosts so that the hostname points to the localhost address:
127.0.0.1 localhost127.0.1.1 ubuntu.example.com localhost# The following lines are desirable for IPv6 capable hosts::1 localhost ip6-localhost ip6-loopbackfe00::0 ip6-localnetff00::0 ip6-mcastprefixff02::1 ip6-allnodesff02::2 ip6-allroutersff02::3 ip6-allhosts - Invoke the host name initialization script(if following command not work, you can reboot system).
start hostname
浙公网安备 33010602011771号