Manually edit DNS in Ubuntu 14.04

22,362

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
Share:
22,362

Related videos on Youtube

Vesal75
Author by

Vesal75

Updated on September 18, 2022

Comments

  • Vesal75
    Vesal75 over 1 year

    I have problem with network connection. Internet don't work but when I type ping 8.8.8.8 in terminal it works.

    So I called ISP and operator tell me that to change DNS but I don't know where it is.

    I'm using Ubuntu 14.04.

  • Vesal75
    Vesal75 over 8 years
    thanks but can you tell why this happened? I didn't change anything but this morning all phones and computers wouldn't connect to computer.
  • hg8
    hg8 over 8 years
    Sorry I am not sure to understand. You connect all your computers and phones to another computer ? I think it is a different problem. You should create a new question for that.
  • NikoNyrh
    NikoNyrh over 2 years
    In my case the configured nameserver becomes the 3rd option at /etc/resolv.conf, not the primary. How to make it the primary (or maybe the only one)? I have an old system, I am not sure if there are DNS configurations on some other files.