How to change the DNS server in Linux?


open this file

$ sudo nano /etc/resolv.conf

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


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.


Rojen Zaman

Anarchist | GnuPG: 0x9089BB25

Linux Dersleri - Taylan Bildik

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