H
H
hckn2018-09-07 23:23:16
linux
hckn, 2018-09-07 23:23:16

Why doesn't it let me change DNS?

Ubuntu 16.04

sudo echo "nameserver 208.67.222.222" > /etc/resolvconf/resolv.conf.d/base
sudo echo "nameserver 208.67.220.220" > /etc/resolvconf/resolv.conf.d/head

Both commands give an error
zsh: permission denied: /etc/resolvconf/resolv.conf.d/base

How then to change the DNS (without masquerades and other additional utilities, and without changing the file manually, which is not recommended)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2018-09-07
@hckn

In this case, sudo refers to echo, and redirect to file is obtained on behalf of the current user
echo 'foo' | sudo tee /filename

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question