Easy mode As root, on device; Code: wget -O ~/hosts http://www.mvps.org/winhelp2002/hosts.txt && echo "127.0.0.1" $(cat /etc/hostname) "localhost" > /etc/hosts && tr -d '\015' < ~/hosts >> /etc/hosts ***big fat warning. I do not actually have an N9 so I do not know if this will actuall work...it should, it works on an n900. ***this will wipe your hosts file, so if you have put anything custom in there, you will have to re-ad it.
wget -O ~/hosts http://www.mvps.org/winhelp2002/hosts.txt && echo "127.0.0.1" $(cat /etc/hostname) "localhost" > /etc/hosts && tr -d '\015' < ~/hosts >> /etc/hosts
127.0.0.1 localhost
:~# ls -al /etc/hostname -rw-r--r-- 1 root root 0 Nov 29 20:11 /etc/hostname