Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
jmholla
· 3mo ago · 0 comments
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
Comments
[–]
fragmede
3mo ago
the sudo -s above it is implied.