To add your nameserver either add the following line to your /etc/network/interfaces file
sudo vi /etc/network/interfaces
dns-nameservers 8.8.8.8, 8.8.4.4
or update the following file with content that you want to see in /etc/resolv.conf file
sudo vi /etc/resolvconf/resolv.conf.d/base
nameserver 8.8.8.8
nameserver 8.8.4.4
Than run next command to update /etc/resolv.conf file
sudo resolvconf -u