How do I configure my DNS settings in Ubuntu server?ping: unknown host google.com in UBUNTU SERVERHow to Change DNS of network from Terminal?Change DNS to Coudflare 1.1.1.1 on Ubuntu 16.0.4 Server Hosted On AWS`apt-get update` cannot find Ubuntu serversAre there differences between CLI and TUI?Very slow DNS lookupCannot connect to internet from VIRTUALBOXKde (Kubuntu) 17.04 error: “waiting for authorization”Ubuntu 17.04 Server DNS ConfigurationHow do I configure network interfaces after installing a basic command-line system?How do I get Ubuntu server 14.04 to display after installation on virtual boxHow to install Ubuntu Server 16.04 from USB (without cdrom)?(K)Ubuntu ignores my router as DNS server, fails to find local hostnameWhere is dhcpcd.conf (dnsmasq installation)?Bind Forward Zone not WorkingUbuntu - Basic Host Name Resolution 18.04 Issues

How to bulge out a face?

Downgrading MacBook Pro 16” to Mojave

Why does this process map every fraction to the golden ratio?

In a world where Magic steam Engines exist what would keep people from making cars

Why would a berry have a slow-acting poison?

What's politest way of writing you got no reply?

How can I speed up secure erasing of a disk?

How can I convince my child to write?

Does trajectory of an object orbiting a planet depend on the object's mass? (With hypothetical apollo example)

Can I exit from a different Schengen country than the one I entered from?

How to write ODE for matrices?

Is it acceptable for the secretary to have full access to our entire Outlook agenda?

How can I swallow pills more easily?

Delete a whole nested list if one of the values in that list contains an "Indeterminate" value

How do I defeat the Molduga

Why dont electrical receptacles have more than one ground?

Who are the strongest non-professional GMs?

Transferring $ from LLC to Personal account

What happens if a player suffers a time penalty but doesn't have enough time left?

Do gray aliens exist in Star Trek?

Does Airplane Mode allow GPS location to pass through?

Should I present forged documents in a Penetration Test/Red team engagement?

Good type of bike to get for commuting (thinking of road v touring)

Is there any reason as to why the schematic symbol of comparators is almost equivalent to that of op amps?



How do I configure my DNS settings in Ubuntu server?


ping: unknown host google.com in UBUNTU SERVERHow to Change DNS of network from Terminal?Change DNS to Coudflare 1.1.1.1 on Ubuntu 16.0.4 Server Hosted On AWS`apt-get update` cannot find Ubuntu serversAre there differences between CLI and TUI?Very slow DNS lookupCannot connect to internet from VIRTUALBOXKde (Kubuntu) 17.04 error: “waiting for authorization”Ubuntu 17.04 Server DNS ConfigurationHow do I configure network interfaces after installing a basic command-line system?How do I get Ubuntu server 14.04 to display after installation on virtual boxHow to install Ubuntu Server 16.04 from USB (without cdrom)?(K)Ubuntu ignores my router as DNS server, fails to find local hostnameWhere is dhcpcd.conf (dnsmasq installation)?Bind Forward Zone not WorkingUbuntu - Basic Host Name Resolution 18.04 Issues






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;









116


















According to this page it appears to be simple. However, /etc/bind does not exist on the default installation of Ubuntu 12.04.3 LTS server.



So, without installing any further software, how can configure DNS and remove dnsmasq on ubuntu server? I am quite familiar with sudo & nano.










share|improve this question



























  • Also take a look at help.ubuntu.com/community/Dnsmasq. bind IS a nameserver. If you need nameserver functionality on your server, you must install a nameserver. It would help if you could describe what it is you are trying to achieve.

    – hmayag
    Sep 17 '13 at 21:37







  • 1





    You were reading a manual to configure a DNS Server, not how to configure the DNS entries in the server. The manual you should have read are this

    – Braiam
    Sep 17 '13 at 22:55











  • I don't have the rep to post a comment on another answer, but in reply to Nullet's answer on September 17th 2013, this worked for me. I was thinking that there was a problem with my router (a cheap, ISP provided one). I also think it worth mentioning that on the dns-nameservers line, you should use the IP of the public DNS. Don't use the local address of the DNS, which is most likely on your router. I was connecting to the DNS on my router, which for some unknown reason wasn't working with my server. Instead, I found out where the DNS on my router was getting its information from, and set dn

    – kyul
    Mar 11 '14 at 18:38






  • 1





    I think there is a better answer here unix.stackexchange.com/a/154538/82018 - basically you can override your dhcp settings to "prepend" a server in front of the ones you currently use. This is nice as you don't have to rely solely on the new server, you just give it precedence for lookups.

    – Steve Midgley
    Nov 22 '14 at 21:07











  • Related: How do I set my DNS when resolv.conf is being overwritten?.

    – iammilind
    May 4 '17 at 6:07

















116


















According to this page it appears to be simple. However, /etc/bind does not exist on the default installation of Ubuntu 12.04.3 LTS server.



So, without installing any further software, how can configure DNS and remove dnsmasq on ubuntu server? I am quite familiar with sudo & nano.










share|improve this question



























  • Also take a look at help.ubuntu.com/community/Dnsmasq. bind IS a nameserver. If you need nameserver functionality on your server, you must install a nameserver. It would help if you could describe what it is you are trying to achieve.

    – hmayag
    Sep 17 '13 at 21:37







  • 1





    You were reading a manual to configure a DNS Server, not how to configure the DNS entries in the server. The manual you should have read are this

    – Braiam
    Sep 17 '13 at 22:55











  • I don't have the rep to post a comment on another answer, but in reply to Nullet's answer on September 17th 2013, this worked for me. I was thinking that there was a problem with my router (a cheap, ISP provided one). I also think it worth mentioning that on the dns-nameservers line, you should use the IP of the public DNS. Don't use the local address of the DNS, which is most likely on your router. I was connecting to the DNS on my router, which for some unknown reason wasn't working with my server. Instead, I found out where the DNS on my router was getting its information from, and set dn

    – kyul
    Mar 11 '14 at 18:38






  • 1





    I think there is a better answer here unix.stackexchange.com/a/154538/82018 - basically you can override your dhcp settings to "prepend" a server in front of the ones you currently use. This is nice as you don't have to rely solely on the new server, you just give it precedence for lookups.

    – Steve Midgley
    Nov 22 '14 at 21:07











  • Related: How do I set my DNS when resolv.conf is being overwritten?.

    – iammilind
    May 4 '17 at 6:07













116













116









116


49






According to this page it appears to be simple. However, /etc/bind does not exist on the default installation of Ubuntu 12.04.3 LTS server.



So, without installing any further software, how can configure DNS and remove dnsmasq on ubuntu server? I am quite familiar with sudo & nano.










share|improve this question
















According to this page it appears to be simple. However, /etc/bind does not exist on the default installation of Ubuntu 12.04.3 LTS server.



So, without installing any further software, how can configure DNS and remove dnsmasq on ubuntu server? I am quite familiar with sudo & nano.







server dns dnsmasq






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 17 '13 at 22:53









Braiam

56.5k21 gold badges147 silver badges230 bronze badges




56.5k21 gold badges147 silver badges230 bronze badges










asked Sep 17 '13 at 21:17









Asta-RiskyAsta-Risky

1,1752 gold badges8 silver badges5 bronze badges




1,1752 gold badges8 silver badges5 bronze badges















  • Also take a look at help.ubuntu.com/community/Dnsmasq. bind IS a nameserver. If you need nameserver functionality on your server, you must install a nameserver. It would help if you could describe what it is you are trying to achieve.

    – hmayag
    Sep 17 '13 at 21:37







  • 1





    You were reading a manual to configure a DNS Server, not how to configure the DNS entries in the server. The manual you should have read are this

    – Braiam
    Sep 17 '13 at 22:55











  • I don't have the rep to post a comment on another answer, but in reply to Nullet's answer on September 17th 2013, this worked for me. I was thinking that there was a problem with my router (a cheap, ISP provided one). I also think it worth mentioning that on the dns-nameservers line, you should use the IP of the public DNS. Don't use the local address of the DNS, which is most likely on your router. I was connecting to the DNS on my router, which for some unknown reason wasn't working with my server. Instead, I found out where the DNS on my router was getting its information from, and set dn

    – kyul
    Mar 11 '14 at 18:38






  • 1





    I think there is a better answer here unix.stackexchange.com/a/154538/82018 - basically you can override your dhcp settings to "prepend" a server in front of the ones you currently use. This is nice as you don't have to rely solely on the new server, you just give it precedence for lookups.

    – Steve Midgley
    Nov 22 '14 at 21:07











  • Related: How do I set my DNS when resolv.conf is being overwritten?.

    – iammilind
    May 4 '17 at 6:07

















  • Also take a look at help.ubuntu.com/community/Dnsmasq. bind IS a nameserver. If you need nameserver functionality on your server, you must install a nameserver. It would help if you could describe what it is you are trying to achieve.

    – hmayag
    Sep 17 '13 at 21:37







  • 1





    You were reading a manual to configure a DNS Server, not how to configure the DNS entries in the server. The manual you should have read are this

    – Braiam
    Sep 17 '13 at 22:55











  • I don't have the rep to post a comment on another answer, but in reply to Nullet's answer on September 17th 2013, this worked for me. I was thinking that there was a problem with my router (a cheap, ISP provided one). I also think it worth mentioning that on the dns-nameservers line, you should use the IP of the public DNS. Don't use the local address of the DNS, which is most likely on your router. I was connecting to the DNS on my router, which for some unknown reason wasn't working with my server. Instead, I found out where the DNS on my router was getting its information from, and set dn

    – kyul
    Mar 11 '14 at 18:38






  • 1





    I think there is a better answer here unix.stackexchange.com/a/154538/82018 - basically you can override your dhcp settings to "prepend" a server in front of the ones you currently use. This is nice as you don't have to rely solely on the new server, you just give it precedence for lookups.

    – Steve Midgley
    Nov 22 '14 at 21:07











  • Related: How do I set my DNS when resolv.conf is being overwritten?.

    – iammilind
    May 4 '17 at 6:07
















Also take a look at help.ubuntu.com/community/Dnsmasq. bind IS a nameserver. If you need nameserver functionality on your server, you must install a nameserver. It would help if you could describe what it is you are trying to achieve.

– hmayag
Sep 17 '13 at 21:37






Also take a look at help.ubuntu.com/community/Dnsmasq. bind IS a nameserver. If you need nameserver functionality on your server, you must install a nameserver. It would help if you could describe what it is you are trying to achieve.

– hmayag
Sep 17 '13 at 21:37





1




1





You were reading a manual to configure a DNS Server, not how to configure the DNS entries in the server. The manual you should have read are this

– Braiam
Sep 17 '13 at 22:55





You were reading a manual to configure a DNS Server, not how to configure the DNS entries in the server. The manual you should have read are this

– Braiam
Sep 17 '13 at 22:55













I don't have the rep to post a comment on another answer, but in reply to Nullet's answer on September 17th 2013, this worked for me. I was thinking that there was a problem with my router (a cheap, ISP provided one). I also think it worth mentioning that on the dns-nameservers line, you should use the IP of the public DNS. Don't use the local address of the DNS, which is most likely on your router. I was connecting to the DNS on my router, which for some unknown reason wasn't working with my server. Instead, I found out where the DNS on my router was getting its information from, and set dn

– kyul
Mar 11 '14 at 18:38





I don't have the rep to post a comment on another answer, but in reply to Nullet's answer on September 17th 2013, this worked for me. I was thinking that there was a problem with my router (a cheap, ISP provided one). I also think it worth mentioning that on the dns-nameservers line, you should use the IP of the public DNS. Don't use the local address of the DNS, which is most likely on your router. I was connecting to the DNS on my router, which for some unknown reason wasn't working with my server. Instead, I found out where the DNS on my router was getting its information from, and set dn

– kyul
Mar 11 '14 at 18:38




1




1





I think there is a better answer here unix.stackexchange.com/a/154538/82018 - basically you can override your dhcp settings to "prepend" a server in front of the ones you currently use. This is nice as you don't have to rely solely on the new server, you just give it precedence for lookups.

– Steve Midgley
Nov 22 '14 at 21:07





I think there is a better answer here unix.stackexchange.com/a/154538/82018 - basically you can override your dhcp settings to "prepend" a server in front of the ones you currently use. This is nice as you don't have to rely solely on the new server, you just give it precedence for lookups.

– Steve Midgley
Nov 22 '14 at 21:07













Related: How do I set my DNS when resolv.conf is being overwritten?.

– iammilind
May 4 '17 at 6:07





Related: How do I set my DNS when resolv.conf is being overwritten?.

– iammilind
May 4 '17 at 6:07










3 Answers
3






active

oldest

votes


















158



















Set DNS Servers



You need to configure the /etc/network/interfaces file if you want to change your DNS server via the command line.



It should look something like this:



# The loopback network interface 
auto lo
iface lo inet loopback


# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.X.X
netmask 255.255.255.0
gateway 192.168.X.X
dns-nameservers X.X.X.X


If you have more than one DNS server, just add a space between each:



dns-nameservers X.X.X.X Y.Y.Y.Y Z.Z.Z.Z


Just replace the Xs, Ys, and Zs with your own IPs of the DNS servers of choice, and when this is done, run this command to update the settings:



sudo ifdown eth0 && sudo ifup eth0


Hope this helps!






share|improve this answer























  • 1





    Yeah, dnsmasq is not installed on ubuntu server as default, if I remember correctly.

    – Nullet
    Sep 17 '13 at 22:47






  • 4





    tried @Nullet solution, but got this error, longtth@long-ubuntu-14:~$ sudo ifdown eth0 && sudo ifup eth0 interface eth0 not configured RTNETLINK answers: File exists Failed to bring up eth0. Can you help me fix it ?

    – Luke
    Mar 28 '15 at 13:58







  • 2





    Here's my situation: I opened the file indicated in this answer and I had only the first 3 lines in it. I pasted in the rest. I ran the command and I got this: ifdown: interface eth0 not configured RTNETLINK answers: File exists Failed to bring up eth0. That concludes the output I received. If anyone has any thoughts that come to mind feel free to respond. I would like to know: what, generally speaking, am I to replace the X's in address and gateway with?

    – GoProCameraByGoPro
    Mar 31 '15 at 10:36






  • 2





    @Mr.Hyde You shouldn't type these lines at terminal, you must to write them inside /etc/network/interfaces file.

    – Richard
    Aug 13 '15 at 3:19







  • 1





    Ensure that you are actually using eth0 and not something else like eth1. ifconfig.

    – briankip
    Mar 23 '16 at 10:47


















9



















However if you are on newer Ubuntu version, you might be using resolv.conf



In order to set dns-nameservers which won't be removed after reboot
add them in



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


like



nameserver x.x.x.x
nameserver x.x.y.y


And afer that just do



sudo resolvconf -u





share|improve this answer


























  • that path doesn't exist on my system I only have /etc/resolvconf/update-libc.d/avahi-daemon which loop for another bash script /usr/lib/avahi/avahi-daemon-check-dns.sh all I want is to get ride of default 192.168.1.1 DNS Servers:

    – Salem F
    Apr 5 at 16:49











  • @SalemF just go-ahead and create that missing file...

    – Aleksandar Pavić
    Apr 8 at 11:46






  • 1





    , it's looks like , ubuntu uses different approach to handle dns setting I was only able change it from the GUI nm` which work after changing DHCP setting to address only and type dns address i.ibb.co/ysqwL0r/DHCP.png

    – Salem F
    Apr 8 at 16:19



















0



















NetworkManager TUI: nmtui



Beside this alternative using nmcli connection edit you might like a more ncurses approach with nmtui, the GNOME's CLITUI alternative to nm-connection-editor.



screenshot nmtui main window



screenshot editing a connection



Note: This anwer is more related to Ubuntu Desktop, but since the suitable question was marked as duplicate of this one (incorrectly, IMO) I post it here.






share|improve this answer



























    protected by Community May 29 '15 at 8:07



    Thank you for your interest in this question.
    Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



    Would you like to answer one of these unanswered questions instead?














    3 Answers
    3






    active

    oldest

    votes








    3 Answers
    3






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    158



















    Set DNS Servers



    You need to configure the /etc/network/interfaces file if you want to change your DNS server via the command line.



    It should look something like this:



    # The loopback network interface 
    auto lo
    iface lo inet loopback


    # The primary network interface
    auto eth0
    iface eth0 inet static
    address 192.168.X.X
    netmask 255.255.255.0
    gateway 192.168.X.X
    dns-nameservers X.X.X.X


    If you have more than one DNS server, just add a space between each:



    dns-nameservers X.X.X.X Y.Y.Y.Y Z.Z.Z.Z


    Just replace the Xs, Ys, and Zs with your own IPs of the DNS servers of choice, and when this is done, run this command to update the settings:



    sudo ifdown eth0 && sudo ifup eth0


    Hope this helps!






    share|improve this answer























    • 1





      Yeah, dnsmasq is not installed on ubuntu server as default, if I remember correctly.

      – Nullet
      Sep 17 '13 at 22:47






    • 4





      tried @Nullet solution, but got this error, longtth@long-ubuntu-14:~$ sudo ifdown eth0 && sudo ifup eth0 interface eth0 not configured RTNETLINK answers: File exists Failed to bring up eth0. Can you help me fix it ?

      – Luke
      Mar 28 '15 at 13:58







    • 2





      Here's my situation: I opened the file indicated in this answer and I had only the first 3 lines in it. I pasted in the rest. I ran the command and I got this: ifdown: interface eth0 not configured RTNETLINK answers: File exists Failed to bring up eth0. That concludes the output I received. If anyone has any thoughts that come to mind feel free to respond. I would like to know: what, generally speaking, am I to replace the X's in address and gateway with?

      – GoProCameraByGoPro
      Mar 31 '15 at 10:36






    • 2





      @Mr.Hyde You shouldn't type these lines at terminal, you must to write them inside /etc/network/interfaces file.

      – Richard
      Aug 13 '15 at 3:19







    • 1





      Ensure that you are actually using eth0 and not something else like eth1. ifconfig.

      – briankip
      Mar 23 '16 at 10:47















    158



















    Set DNS Servers



    You need to configure the /etc/network/interfaces file if you want to change your DNS server via the command line.



    It should look something like this:



    # The loopback network interface 
    auto lo
    iface lo inet loopback


    # The primary network interface
    auto eth0
    iface eth0 inet static
    address 192.168.X.X
    netmask 255.255.255.0
    gateway 192.168.X.X
    dns-nameservers X.X.X.X


    If you have more than one DNS server, just add a space between each:



    dns-nameservers X.X.X.X Y.Y.Y.Y Z.Z.Z.Z


    Just replace the Xs, Ys, and Zs with your own IPs of the DNS servers of choice, and when this is done, run this command to update the settings:



    sudo ifdown eth0 && sudo ifup eth0


    Hope this helps!






    share|improve this answer























    • 1





      Yeah, dnsmasq is not installed on ubuntu server as default, if I remember correctly.

      – Nullet
      Sep 17 '13 at 22:47






    • 4





      tried @Nullet solution, but got this error, longtth@long-ubuntu-14:~$ sudo ifdown eth0 && sudo ifup eth0 interface eth0 not configured RTNETLINK answers: File exists Failed to bring up eth0. Can you help me fix it ?

      – Luke
      Mar 28 '15 at 13:58







    • 2





      Here's my situation: I opened the file indicated in this answer and I had only the first 3 lines in it. I pasted in the rest. I ran the command and I got this: ifdown: interface eth0 not configured RTNETLINK answers: File exists Failed to bring up eth0. That concludes the output I received. If anyone has any thoughts that come to mind feel free to respond. I would like to know: what, generally speaking, am I to replace the X's in address and gateway with?

      – GoProCameraByGoPro
      Mar 31 '15 at 10:36






    • 2





      @Mr.Hyde You shouldn't type these lines at terminal, you must to write them inside /etc/network/interfaces file.

      – Richard
      Aug 13 '15 at 3:19







    • 1





      Ensure that you are actually using eth0 and not something else like eth1. ifconfig.

      – briankip
      Mar 23 '16 at 10:47













    158















    158











    158









    Set DNS Servers



    You need to configure the /etc/network/interfaces file if you want to change your DNS server via the command line.



    It should look something like this:



    # The loopback network interface 
    auto lo
    iface lo inet loopback


    # The primary network interface
    auto eth0
    iface eth0 inet static
    address 192.168.X.X
    netmask 255.255.255.0
    gateway 192.168.X.X
    dns-nameservers X.X.X.X


    If you have more than one DNS server, just add a space between each:



    dns-nameservers X.X.X.X Y.Y.Y.Y Z.Z.Z.Z


    Just replace the Xs, Ys, and Zs with your own IPs of the DNS servers of choice, and when this is done, run this command to update the settings:



    sudo ifdown eth0 && sudo ifup eth0


    Hope this helps!






    share|improve this answer
















    Set DNS Servers



    You need to configure the /etc/network/interfaces file if you want to change your DNS server via the command line.



    It should look something like this:



    # The loopback network interface 
    auto lo
    iface lo inet loopback


    # The primary network interface
    auto eth0
    iface eth0 inet static
    address 192.168.X.X
    netmask 255.255.255.0
    gateway 192.168.X.X
    dns-nameservers X.X.X.X


    If you have more than one DNS server, just add a space between each:



    dns-nameservers X.X.X.X Y.Y.Y.Y Z.Z.Z.Z


    Just replace the Xs, Ys, and Zs with your own IPs of the DNS servers of choice, and when this is done, run this command to update the settings:



    sudo ifdown eth0 && sudo ifup eth0


    Hope this helps!







    share|improve this answer















    share|improve this answer




    share|improve this answer








    edited Sep 14 at 18:39









    Pablo A

    4,5653 gold badges23 silver badges49 bronze badges




    4,5653 gold badges23 silver badges49 bronze badges










    answered Sep 17 '13 at 21:36









    NulletNullet

    2,6761 gold badge13 silver badges15 bronze badges




    2,6761 gold badge13 silver badges15 bronze badges










    • 1





      Yeah, dnsmasq is not installed on ubuntu server as default, if I remember correctly.

      – Nullet
      Sep 17 '13 at 22:47






    • 4





      tried @Nullet solution, but got this error, longtth@long-ubuntu-14:~$ sudo ifdown eth0 && sudo ifup eth0 interface eth0 not configured RTNETLINK answers: File exists Failed to bring up eth0. Can you help me fix it ?

      – Luke
      Mar 28 '15 at 13:58







    • 2





      Here's my situation: I opened the file indicated in this answer and I had only the first 3 lines in it. I pasted in the rest. I ran the command and I got this: ifdown: interface eth0 not configured RTNETLINK answers: File exists Failed to bring up eth0. That concludes the output I received. If anyone has any thoughts that come to mind feel free to respond. I would like to know: what, generally speaking, am I to replace the X's in address and gateway with?

      – GoProCameraByGoPro
      Mar 31 '15 at 10:36






    • 2





      @Mr.Hyde You shouldn't type these lines at terminal, you must to write them inside /etc/network/interfaces file.

      – Richard
      Aug 13 '15 at 3:19







    • 1





      Ensure that you are actually using eth0 and not something else like eth1. ifconfig.

      – briankip
      Mar 23 '16 at 10:47












    • 1





      Yeah, dnsmasq is not installed on ubuntu server as default, if I remember correctly.

      – Nullet
      Sep 17 '13 at 22:47






    • 4





      tried @Nullet solution, but got this error, longtth@long-ubuntu-14:~$ sudo ifdown eth0 && sudo ifup eth0 interface eth0 not configured RTNETLINK answers: File exists Failed to bring up eth0. Can you help me fix it ?

      – Luke
      Mar 28 '15 at 13:58







    • 2





      Here's my situation: I opened the file indicated in this answer and I had only the first 3 lines in it. I pasted in the rest. I ran the command and I got this: ifdown: interface eth0 not configured RTNETLINK answers: File exists Failed to bring up eth0. That concludes the output I received. If anyone has any thoughts that come to mind feel free to respond. I would like to know: what, generally speaking, am I to replace the X's in address and gateway with?

      – GoProCameraByGoPro
      Mar 31 '15 at 10:36






    • 2





      @Mr.Hyde You shouldn't type these lines at terminal, you must to write them inside /etc/network/interfaces file.

      – Richard
      Aug 13 '15 at 3:19







    • 1





      Ensure that you are actually using eth0 and not something else like eth1. ifconfig.

      – briankip
      Mar 23 '16 at 10:47







    1




    1





    Yeah, dnsmasq is not installed on ubuntu server as default, if I remember correctly.

    – Nullet
    Sep 17 '13 at 22:47





    Yeah, dnsmasq is not installed on ubuntu server as default, if I remember correctly.

    – Nullet
    Sep 17 '13 at 22:47




    4




    4





    tried @Nullet solution, but got this error, longtth@long-ubuntu-14:~$ sudo ifdown eth0 && sudo ifup eth0 interface eth0 not configured RTNETLINK answers: File exists Failed to bring up eth0. Can you help me fix it ?

    – Luke
    Mar 28 '15 at 13:58






    tried @Nullet solution, but got this error, longtth@long-ubuntu-14:~$ sudo ifdown eth0 && sudo ifup eth0 interface eth0 not configured RTNETLINK answers: File exists Failed to bring up eth0. Can you help me fix it ?

    – Luke
    Mar 28 '15 at 13:58





    2




    2





    Here's my situation: I opened the file indicated in this answer and I had only the first 3 lines in it. I pasted in the rest. I ran the command and I got this: ifdown: interface eth0 not configured RTNETLINK answers: File exists Failed to bring up eth0. That concludes the output I received. If anyone has any thoughts that come to mind feel free to respond. I would like to know: what, generally speaking, am I to replace the X's in address and gateway with?

    – GoProCameraByGoPro
    Mar 31 '15 at 10:36





    Here's my situation: I opened the file indicated in this answer and I had only the first 3 lines in it. I pasted in the rest. I ran the command and I got this: ifdown: interface eth0 not configured RTNETLINK answers: File exists Failed to bring up eth0. That concludes the output I received. If anyone has any thoughts that come to mind feel free to respond. I would like to know: what, generally speaking, am I to replace the X's in address and gateway with?

    – GoProCameraByGoPro
    Mar 31 '15 at 10:36




    2




    2





    @Mr.Hyde You shouldn't type these lines at terminal, you must to write them inside /etc/network/interfaces file.

    – Richard
    Aug 13 '15 at 3:19






    @Mr.Hyde You shouldn't type these lines at terminal, you must to write them inside /etc/network/interfaces file.

    – Richard
    Aug 13 '15 at 3:19





    1




    1





    Ensure that you are actually using eth0 and not something else like eth1. ifconfig.

    – briankip
    Mar 23 '16 at 10:47





    Ensure that you are actually using eth0 and not something else like eth1. ifconfig.

    – briankip
    Mar 23 '16 at 10:47













    9



















    However if you are on newer Ubuntu version, you might be using resolv.conf



    In order to set dns-nameservers which won't be removed after reboot
    add them in



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


    like



    nameserver x.x.x.x
    nameserver x.x.y.y


    And afer that just do



    sudo resolvconf -u





    share|improve this answer


























    • that path doesn't exist on my system I only have /etc/resolvconf/update-libc.d/avahi-daemon which loop for another bash script /usr/lib/avahi/avahi-daemon-check-dns.sh all I want is to get ride of default 192.168.1.1 DNS Servers:

      – Salem F
      Apr 5 at 16:49











    • @SalemF just go-ahead and create that missing file...

      – Aleksandar Pavić
      Apr 8 at 11:46






    • 1





      , it's looks like , ubuntu uses different approach to handle dns setting I was only able change it from the GUI nm` which work after changing DHCP setting to address only and type dns address i.ibb.co/ysqwL0r/DHCP.png

      – Salem F
      Apr 8 at 16:19
















    9



















    However if you are on newer Ubuntu version, you might be using resolv.conf



    In order to set dns-nameservers which won't be removed after reboot
    add them in



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


    like



    nameserver x.x.x.x
    nameserver x.x.y.y


    And afer that just do



    sudo resolvconf -u





    share|improve this answer


























    • that path doesn't exist on my system I only have /etc/resolvconf/update-libc.d/avahi-daemon which loop for another bash script /usr/lib/avahi/avahi-daemon-check-dns.sh all I want is to get ride of default 192.168.1.1 DNS Servers:

      – Salem F
      Apr 5 at 16:49











    • @SalemF just go-ahead and create that missing file...

      – Aleksandar Pavić
      Apr 8 at 11:46






    • 1





      , it's looks like , ubuntu uses different approach to handle dns setting I was only able change it from the GUI nm` which work after changing DHCP setting to address only and type dns address i.ibb.co/ysqwL0r/DHCP.png

      – Salem F
      Apr 8 at 16:19














    9















    9











    9









    However if you are on newer Ubuntu version, you might be using resolv.conf



    In order to set dns-nameservers which won't be removed after reboot
    add them in



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


    like



    nameserver x.x.x.x
    nameserver x.x.y.y


    And afer that just do



    sudo resolvconf -u





    share|improve this answer














    However if you are on newer Ubuntu version, you might be using resolv.conf



    In order to set dns-nameservers which won't be removed after reboot
    add them in



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


    like



    nameserver x.x.x.x
    nameserver x.x.y.y


    And afer that just do



    sudo resolvconf -u






    share|improve this answer













    share|improve this answer




    share|improve this answer










    answered Mar 28 at 12:25









    Aleksandar PavićAleksandar Pavić

    4086 silver badges11 bronze badges




    4086 silver badges11 bronze badges















    • that path doesn't exist on my system I only have /etc/resolvconf/update-libc.d/avahi-daemon which loop for another bash script /usr/lib/avahi/avahi-daemon-check-dns.sh all I want is to get ride of default 192.168.1.1 DNS Servers:

      – Salem F
      Apr 5 at 16:49











    • @SalemF just go-ahead and create that missing file...

      – Aleksandar Pavić
      Apr 8 at 11:46






    • 1





      , it's looks like , ubuntu uses different approach to handle dns setting I was only able change it from the GUI nm` which work after changing DHCP setting to address only and type dns address i.ibb.co/ysqwL0r/DHCP.png

      – Salem F
      Apr 8 at 16:19


















    • that path doesn't exist on my system I only have /etc/resolvconf/update-libc.d/avahi-daemon which loop for another bash script /usr/lib/avahi/avahi-daemon-check-dns.sh all I want is to get ride of default 192.168.1.1 DNS Servers:

      – Salem F
      Apr 5 at 16:49











    • @SalemF just go-ahead and create that missing file...

      – Aleksandar Pavić
      Apr 8 at 11:46






    • 1





      , it's looks like , ubuntu uses different approach to handle dns setting I was only able change it from the GUI nm` which work after changing DHCP setting to address only and type dns address i.ibb.co/ysqwL0r/DHCP.png

      – Salem F
      Apr 8 at 16:19

















    that path doesn't exist on my system I only have /etc/resolvconf/update-libc.d/avahi-daemon which loop for another bash script /usr/lib/avahi/avahi-daemon-check-dns.sh all I want is to get ride of default 192.168.1.1 DNS Servers:

    – Salem F
    Apr 5 at 16:49





    that path doesn't exist on my system I only have /etc/resolvconf/update-libc.d/avahi-daemon which loop for another bash script /usr/lib/avahi/avahi-daemon-check-dns.sh all I want is to get ride of default 192.168.1.1 DNS Servers:

    – Salem F
    Apr 5 at 16:49













    @SalemF just go-ahead and create that missing file...

    – Aleksandar Pavić
    Apr 8 at 11:46





    @SalemF just go-ahead and create that missing file...

    – Aleksandar Pavić
    Apr 8 at 11:46




    1




    1





    , it's looks like , ubuntu uses different approach to handle dns setting I was only able change it from the GUI nm` which work after changing DHCP setting to address only and type dns address i.ibb.co/ysqwL0r/DHCP.png

    – Salem F
    Apr 8 at 16:19






    , it's looks like , ubuntu uses different approach to handle dns setting I was only able change it from the GUI nm` which work after changing DHCP setting to address only and type dns address i.ibb.co/ysqwL0r/DHCP.png

    – Salem F
    Apr 8 at 16:19












    0



















    NetworkManager TUI: nmtui



    Beside this alternative using nmcli connection edit you might like a more ncurses approach with nmtui, the GNOME's CLITUI alternative to nm-connection-editor.



    screenshot nmtui main window



    screenshot editing a connection



    Note: This anwer is more related to Ubuntu Desktop, but since the suitable question was marked as duplicate of this one (incorrectly, IMO) I post it here.






    share|improve this answer
































      0



















      NetworkManager TUI: nmtui



      Beside this alternative using nmcli connection edit you might like a more ncurses approach with nmtui, the GNOME's CLITUI alternative to nm-connection-editor.



      screenshot nmtui main window



      screenshot editing a connection



      Note: This anwer is more related to Ubuntu Desktop, but since the suitable question was marked as duplicate of this one (incorrectly, IMO) I post it here.






      share|improve this answer






























        0















        0











        0









        NetworkManager TUI: nmtui



        Beside this alternative using nmcli connection edit you might like a more ncurses approach with nmtui, the GNOME's CLITUI alternative to nm-connection-editor.



        screenshot nmtui main window



        screenshot editing a connection



        Note: This anwer is more related to Ubuntu Desktop, but since the suitable question was marked as duplicate of this one (incorrectly, IMO) I post it here.






        share|improve this answer
















        NetworkManager TUI: nmtui



        Beside this alternative using nmcli connection edit you might like a more ncurses approach with nmtui, the GNOME's CLITUI alternative to nm-connection-editor.



        screenshot nmtui main window



        screenshot editing a connection



        Note: This anwer is more related to Ubuntu Desktop, but since the suitable question was marked as duplicate of this one (incorrectly, IMO) I post it here.







        share|improve this answer















        share|improve this answer




        share|improve this answer








        edited Sep 14 at 19:21

























        answered Sep 14 at 18:53









        Pablo APablo A

        4,5653 gold badges23 silver badges49 bronze badges




        4,5653 gold badges23 silver badges49 bronze badges


















            protected by Community May 29 '15 at 8:07



            Thank you for your interest in this question.
            Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).



            Would you like to answer one of these unanswered questions instead?



            Popular posts from this blog

            Tamil (spriik) Luke uk diar | Nawigatjuun

            Align equal signs while including text over equalitiesAMS align: left aligned text/math plus multicolumn alignmentMultiple alignmentsAligning equations in multiple placesNumbering and aligning an equation with multiple columnsHow to align one equation with another multline equationUsing \ in environments inside the begintabularxNumber equations and preserving alignment of equal signsHow can I align equations to the left and to the right?Double equation alignment problem within align enviromentAligned within align: Why are they right-aligned?

            Where does the image of a data connector as a sharp metal spike originate from?Where does the concept of infected people turning into zombies only after death originate from?Where does the motif of a reanimated human head originate?Where did the notion that Dragons could speak originate?Where does the archetypal image of the 'Grey' alien come from?Where did the suffix '-Man' originate?Where does the notion of being injured or killed by an illusion originate?Where did the term “sophont” originate?Where does the trope of magic spells being driven by advanced technology originate from?Where did the term “the living impaired” originate?