How to change the DNS server in Linux?

2020-07-05

open this file

$ sudo nano /etc/resolv.conf

Remove the IP address created by NetworkManager and add the follow line (I am add the 1.1.1.1 address to here.)

nameserver 1.1.1.1

Save and exit, then run follow command for NetworkManager does not override the file

$ sudo chattr +i /etc/resolv.conf

If you want edit the file type sudo chattr -i /etc/resolv.conf and add your configuration, finally retype chattr +i command.

otherdns

Rojen Zaman

Anarchist | GnuPG: 0x9089BB25

Linux Dersleri - Taylan Bildik

TLS/Şifreli Güvenli VNC Sunucusu Oluşturmak İçin Kolay Rehber