Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'A little help for a Terminal neophyte?' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A little help for a Terminal neophyte?
Authored by: a1291762 on May 12, '03 07:21:15PM
I'm getting "etc/hosts: Permission denied" when trying this. I tried both "su echo..." and "sudo echo...", but obviously that's not doing it. Can somebody tell me how to accomplish this? Do I have to log out and back in as root? That seems crazy... Shouldn't "sudo" do it?

I suspect the original post was meant to be:

su
echo 66.77.74.20 www.google.com >> /etc/hosts
exit

I prefer sudo -s rather than su because I don't have to enable the root account.

Your problem is that the >> chars are being interpreted by your shell rather than the privileged subshell.

[ Reply to This | # ]

A little help for a Terminal neophyte?
Authored by: lhatton on May 12, '03 09:50:25PM

I suspect the original post was meant to be:
su
echo 66.77.74.20 www.google.com >> /etc/hosts
exit

I had originally written it that way when I submitted the hint, but for some reason it became changed when it was posted.



[ Reply to This | # ]