logoalt Hacker News

frollogastontoday at 12:13 AM2 repliesview on HN

  sudo echo "127.0.0.1   www.reddit.com" >> /etc/hosts

Replies

jmhollatoday at 1:09 AM

The write by your shell through the redirect won't get those elevated privileges. You need to use something like tee:

    echo "127.0.0.1    www.reddit.com" | sudo tee -a /etc/hosts
show 1 reply
Avicebrontoday at 12:28 AM

If this is a glass house joke well done.

show 2 replies