This line used to work
sudo -b "/Applications/Textedit.app/Contents/MacOS/TextEdit" /etc/hosts
But on Yosemite, it does not work anymore.
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.Sign up to join this community
Yes I just tried your command and it exists with error code 132 (I don't know why).
You can still use this to open your hosts file
sudo open -t /etc/hosts. It will open the TextEdit app, if you want to run it in the background you can add your
-b in the command line. Or you can use other text editors like vim and nano they're both working perfectly with Yosemite.