For Ubuntu

Hosts should be entered into /etc/hosts file. localhost.localdomain localhost xxx

xxx is where you put what ever name you wish… everything else is the same.

don’t forget to reboot the machine orr.

sudo /etc/rc.d/init.d/network restart

For WinXP
Click on start > run
And then past this line
And then add this line
point-to-your-ip your-host-name
And then
resart DNS Client Service