Manually edit DNS in Ubuntu 14.04

Solution 1:

The easiest way to set a custom DNS on Ubuntu 14.04 (and other) is by editing the base file of the resolv.conf.d folder:

sudo nano /etc/resolvconf/resolv.conf.d/base

Add your DNS to the file :

nameserver 8.8.8.8
nameserver 8.8.4.4

Update resolv configuration :

sudo resolvconf -u