So I usually change my host file and for some reason since I upgrade SL to Lion I can't no longer enter this command "sudo /Applications/TextEdit.app/Contents/MacOS/TextEdit /etc/hosts" can someone pst the right command for Lion plz thanx.
If I remember correctly, it's actually just a bug in Lion that messes with host file editing. I used gas mask, and it worked, so you might want to just try that instead.
Yeah Lion blocks the opening of the file through text edit now.
Either use the program axu539 suggested or go into terminal (logged in as admin) and do it manually by typing:
Instead of directly editing the hosts file, work on a copy and only copy it to /etc once you are done. To really be on the safe side, first mv your existing hosts file to a backup, hosts.20110919 if you were to do this today, for example.