shell script to add dns servers in resolv.conf file code example
Example 1: resolvconf set dns
$ sudo apt update
$ sudo apt install resolvconf
Example 2: resolvconf set dns
$ sudo systemctl start resolvconf.service
$ sudo systemctl enable resolvconf.service
$ sudo systemctl status resolvconf.service