View Single Post
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#31
Originally Posted by vi_ View Post
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.
vi_,

The download and transfer of file to /etc/hosts works but the $(cat /etc/hostname) didn't put RM696 into the hosts file...

See:
Code:
127.0.0.1  localhost
I don't know about other n9's but my hostname file is empty:
Code:
:~# ls -al /etc/hostname
-rw-r--r--    1 root     root             0 Nov 29 20:11 /etc/hostname

I had deleted the same hosts file that I already had prior to your post so its a fresh test...


Edit: Why not replace (cat /etc/hostname) with (uname -n)?

Edit 2: Replacing with (uname -n) in your command didn't do the change too; will check and report...

Last edited by thedead1440; 2012-11-29 at 12:30.