How shall I understand the format of `/etc/resolv.conf`?












1















How shall I understand the format of /etc/resolv.conf?



$ cat /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
search fios-router.home


Manpage of /etc/resolve.conf says




The different configuration options are:



   nameserver Name server IP address

Internet address of a name server that the resolver should
query...



So does nameserver 127.0.0.53 mean that my local machine is running a DNS server whose IP address is 127.0.0.53? How can I find out its process?




   domain Local domain name.

Most queries for names within this domain can use short names
relative to the local domain. If set to '.', the root domain
is considered. If no domain entry is present, the domain is
determined from the local hostname returned by gethostname(2);
the domain part is taken to be everything after the first '.'.
Finally, if the hostname does not contain a domain part, the
root domain is assumed.



What does this part mean? The above just mentions what values that can be set to something, and does not explain what this part in /etc/resolv.conf means. Why does my /etc/resolv.conf not have this part?




   search Search list for host-name lookup.

The search list is normally determined from the local domain
name; by default, it contains only the local domain name.



What does this part mean? What does search fios-router.home in my /etc/resolv.conf mean?



Thanks.










share|improve this question

























  • You can run netstat -up as root to see if and who is listening on port 53 of :: or 0.0.0.0 or 127.0.0.53.

    – eckes
    5 hours ago











  • freedesktop.org/software/systemd/man/… you might be in a systemd-resolved manging mode

    – 炸鱼薯条德里克
    2 hours ago











  • Just note that the netmask for localhost is 255.0.0.0, a /8. So 127.0.0.53 is also localhost.

    – Lenne
    2 hours ago













  • @eckes netstat -up shows nothing is listening

    – Tim
    9 mins ago
















1















How shall I understand the format of /etc/resolv.conf?



$ cat /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
search fios-router.home


Manpage of /etc/resolve.conf says




The different configuration options are:



   nameserver Name server IP address

Internet address of a name server that the resolver should
query...



So does nameserver 127.0.0.53 mean that my local machine is running a DNS server whose IP address is 127.0.0.53? How can I find out its process?




   domain Local domain name.

Most queries for names within this domain can use short names
relative to the local domain. If set to '.', the root domain
is considered. If no domain entry is present, the domain is
determined from the local hostname returned by gethostname(2);
the domain part is taken to be everything after the first '.'.
Finally, if the hostname does not contain a domain part, the
root domain is assumed.



What does this part mean? The above just mentions what values that can be set to something, and does not explain what this part in /etc/resolv.conf means. Why does my /etc/resolv.conf not have this part?




   search Search list for host-name lookup.

The search list is normally determined from the local domain
name; by default, it contains only the local domain name.



What does this part mean? What does search fios-router.home in my /etc/resolv.conf mean?



Thanks.










share|improve this question

























  • You can run netstat -up as root to see if and who is listening on port 53 of :: or 0.0.0.0 or 127.0.0.53.

    – eckes
    5 hours ago











  • freedesktop.org/software/systemd/man/… you might be in a systemd-resolved manging mode

    – 炸鱼薯条德里克
    2 hours ago











  • Just note that the netmask for localhost is 255.0.0.0, a /8. So 127.0.0.53 is also localhost.

    – Lenne
    2 hours ago













  • @eckes netstat -up shows nothing is listening

    – Tim
    9 mins ago














1












1








1


0






How shall I understand the format of /etc/resolv.conf?



$ cat /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
search fios-router.home


Manpage of /etc/resolve.conf says




The different configuration options are:



   nameserver Name server IP address

Internet address of a name server that the resolver should
query...



So does nameserver 127.0.0.53 mean that my local machine is running a DNS server whose IP address is 127.0.0.53? How can I find out its process?




   domain Local domain name.

Most queries for names within this domain can use short names
relative to the local domain. If set to '.', the root domain
is considered. If no domain entry is present, the domain is
determined from the local hostname returned by gethostname(2);
the domain part is taken to be everything after the first '.'.
Finally, if the hostname does not contain a domain part, the
root domain is assumed.



What does this part mean? The above just mentions what values that can be set to something, and does not explain what this part in /etc/resolv.conf means. Why does my /etc/resolv.conf not have this part?




   search Search list for host-name lookup.

The search list is normally determined from the local domain
name; by default, it contains only the local domain name.



What does this part mean? What does search fios-router.home in my /etc/resolv.conf mean?



Thanks.










share|improve this question
















How shall I understand the format of /etc/resolv.conf?



$ cat /etc/resolv.conf
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.

nameserver 127.0.0.53
search fios-router.home


Manpage of /etc/resolve.conf says




The different configuration options are:



   nameserver Name server IP address

Internet address of a name server that the resolver should
query...



So does nameserver 127.0.0.53 mean that my local machine is running a DNS server whose IP address is 127.0.0.53? How can I find out its process?




   domain Local domain name.

Most queries for names within this domain can use short names
relative to the local domain. If set to '.', the root domain
is considered. If no domain entry is present, the domain is
determined from the local hostname returned by gethostname(2);
the domain part is taken to be everything after the first '.'.
Finally, if the hostname does not contain a domain part, the
root domain is assumed.



What does this part mean? The above just mentions what values that can be set to something, and does not explain what this part in /etc/resolv.conf means. Why does my /etc/resolv.conf not have this part?




   search Search list for host-name lookup.

The search list is normally determined from the local domain
name; by default, it contains only the local domain name.



What does this part mean? What does search fios-router.home in my /etc/resolv.conf mean?



Thanks.







dns resolv.conf






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited 9 hours ago







Tim

















asked 9 hours ago









TimTim

26.8k77258469




26.8k77258469













  • You can run netstat -up as root to see if and who is listening on port 53 of :: or 0.0.0.0 or 127.0.0.53.

    – eckes
    5 hours ago











  • freedesktop.org/software/systemd/man/… you might be in a systemd-resolved manging mode

    – 炸鱼薯条德里克
    2 hours ago











  • Just note that the netmask for localhost is 255.0.0.0, a /8. So 127.0.0.53 is also localhost.

    – Lenne
    2 hours ago













  • @eckes netstat -up shows nothing is listening

    – Tim
    9 mins ago



















  • You can run netstat -up as root to see if and who is listening on port 53 of :: or 0.0.0.0 or 127.0.0.53.

    – eckes
    5 hours ago











  • freedesktop.org/software/systemd/man/… you might be in a systemd-resolved manging mode

    – 炸鱼薯条德里克
    2 hours ago











  • Just note that the netmask for localhost is 255.0.0.0, a /8. So 127.0.0.53 is also localhost.

    – Lenne
    2 hours ago













  • @eckes netstat -up shows nothing is listening

    – Tim
    9 mins ago

















You can run netstat -up as root to see if and who is listening on port 53 of :: or 0.0.0.0 or 127.0.0.53.

– eckes
5 hours ago





You can run netstat -up as root to see if and who is listening on port 53 of :: or 0.0.0.0 or 127.0.0.53.

– eckes
5 hours ago













freedesktop.org/software/systemd/man/… you might be in a systemd-resolved manging mode

– 炸鱼薯条德里克
2 hours ago





freedesktop.org/software/systemd/man/… you might be in a systemd-resolved manging mode

– 炸鱼薯条德里克
2 hours ago













Just note that the netmask for localhost is 255.0.0.0, a /8. So 127.0.0.53 is also localhost.

– Lenne
2 hours ago







Just note that the netmask for localhost is 255.0.0.0, a /8. So 127.0.0.53 is also localhost.

– Lenne
2 hours ago















@eckes netstat -up shows nothing is listening

– Tim
9 mins ago





@eckes netstat -up shows nothing is listening

– Tim
9 mins ago










4 Answers
4






active

oldest

votes


















3














Yes, the first part indicates that your system is expecting a nameserver to be listening on localhost, in this case, specifically 127.0.0.53.



The second part is a search path that is appended to all searches not ending in a period (.). If you run, for instance, ssh blah, DNS will first try to look up blah, then try looking up blah.fios-router.home.






share|improve this answer


























  • Thanks. I never know the local machine is running a DNS server. Can you tell me how to find out its process?

    – Tim
    9 hours ago











  • Try pgrep systemd-resolved or systemctl status systemd-resolved.

    – telcoM
    8 hours ago











  • @telcoM pgrep systemd-resolved returns nothing. Does nameserver 127.0.0.53 really mean the my local machine is running a DNS server?

    – Tim
    35 mins ago





















2














The search fios-router.home part is the last resolvable domain, i.e. your router (iirc Verizon).



127.0.0.53 is the IP address of the nameserver, so your assumption is correct.






share|improve this answer










New contributor




Radu Chirovici is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





















  • Thanks. (1) What is "a resolvable domain" and what is "the last resolvable domain"? (2) Do you mean my local machine is running a DNS server? Which process is the DNS server?

    – Tim
    9 hours ago





















2














/etc/resolve.conf is the main configuration file for the DNS client, so its presence does not imply that you are running a DNS server.



Its primary purpose is to list the IP addresses of DNS servers, in your case:




nameserver 127.0.0.53





  • Entries of type nameserver tell the host, which DNS server to use.

  • An entry of type domain (if present) tells the system which domain it is in. This allows to be addressed by its host name. (Addition in response to a comment: The hostname is the computer's name in the network. On many systems, you can see the hostname in the command prompt; if not, you can find it by using the command hostname.)

  • An entry of type search (if present) would allow computers from different domains to address each other by their respective host names.


The file is nowadays usually generated by NeteworkManager (for example, on my system, the file starts with the comment "Generated by NetworkManager") or by systemd-resolved.



systemd-resolved




is a system service that provides network name resolution to local applications. It implements a caching and validating DNS/DNSSEC stub resolver, as well as an LLMNR and MulticastDNS resolver and responder.




Also according to systemd-resolved's manpage, the address 127.0.0.53 is a "local DNS stub listener". On related Stack Exchange sites, there have been questions about how to change this, since the file is /etc/resolv.conf is automatically generated. See for example





  • Wrong nameserver set by resolvconf and NetworkManager (Ubuntu SE).


  • DNS set to systemd's 127.0.0.53 - how to change permanently? (Ubuntu SE).






share|improve this answer





















  • 1





    Thanks. (1) "Entries of type nameserver tell the host, which DNS server to use." 127.0.0.53 is an IP of local machine. How is that not contradictory to "its presence does not imply that you are running a DNS server"? (2) "An entry of type domain (if present) tells the system which domain it is in. This allows to be addressed by its host name." What is the difference and relation between a domain (name) and a host name?

    – Tim
    9 hours ago













  • 1) it is only visible to your local system, not to any other systems; not even within your home network. So it does not serve any others. 2) A hostname might be short (host1) or fully-qualified (host1.fios-router.home). In this example, the domain of host1.fios-router.home would be fios-router.home.

    – telcoM
    8 hours ago











  • So ls -al /etc/resolv.conf and cat /etc/resolv.conf will inform you which program/service is controlling resolv.conf. If you've messed about with your system then you might have a couple of programs competing for control - I had this before with dnsmasq, bind, and systemd-resolved. In addition @Tim, to what telcoM says about your questions: the DNS server and resolver ("stub resolver") can be different, you can pass DNS requests to 127.0.0.53 which pass them to your router for actual DNS (eg it could handle local hosts but pass requests for remote hosts on for full DNS).

    – pbhj
    6 hours ago











  • @pbhj "you can pass DNS requests to 127.0.0.53 which pass them to your router for actual DNS." 127.0.0.53 refers to the local machine itself, so why does it pass DNS request to your router ?

    – Tim
    36 mins ago



















1














resolv.conf is part of the standard way to resolve a host name to an IP address. It is part of the resolver library.



There are different ways to resolve your host name:




  • files (specifically: /etc/hosts)

  • dns

  • NIS, NIS+ or yp


The sequence in which they are used is in /etc/nsswitch.conf. This normally says



hosts:      files dns


which means that the resolver library first looks in /etc/hosts and, if it cannot find it there, will use DNS.



Now DNS will query a DNS server. Which one is determined by /etc/resolv.conf. In addition, there are a number of additional parameters that you can use to help the DNS reolution, of which search (Try this domain first for the host) is probably the most used.






share|improve this answer























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f499993%2fhow-shall-i-understand-the-format-of-etc-resolv-conf%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    4 Answers
    4






    active

    oldest

    votes








    4 Answers
    4






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3














    Yes, the first part indicates that your system is expecting a nameserver to be listening on localhost, in this case, specifically 127.0.0.53.



    The second part is a search path that is appended to all searches not ending in a period (.). If you run, for instance, ssh blah, DNS will first try to look up blah, then try looking up blah.fios-router.home.






    share|improve this answer


























    • Thanks. I never know the local machine is running a DNS server. Can you tell me how to find out its process?

      – Tim
      9 hours ago











    • Try pgrep systemd-resolved or systemctl status systemd-resolved.

      – telcoM
      8 hours ago











    • @telcoM pgrep systemd-resolved returns nothing. Does nameserver 127.0.0.53 really mean the my local machine is running a DNS server?

      – Tim
      35 mins ago


















    3














    Yes, the first part indicates that your system is expecting a nameserver to be listening on localhost, in this case, specifically 127.0.0.53.



    The second part is a search path that is appended to all searches not ending in a period (.). If you run, for instance, ssh blah, DNS will first try to look up blah, then try looking up blah.fios-router.home.






    share|improve this answer


























    • Thanks. I never know the local machine is running a DNS server. Can you tell me how to find out its process?

      – Tim
      9 hours ago











    • Try pgrep systemd-resolved or systemctl status systemd-resolved.

      – telcoM
      8 hours ago











    • @telcoM pgrep systemd-resolved returns nothing. Does nameserver 127.0.0.53 really mean the my local machine is running a DNS server?

      – Tim
      35 mins ago
















    3












    3








    3







    Yes, the first part indicates that your system is expecting a nameserver to be listening on localhost, in this case, specifically 127.0.0.53.



    The second part is a search path that is appended to all searches not ending in a period (.). If you run, for instance, ssh blah, DNS will first try to look up blah, then try looking up blah.fios-router.home.






    share|improve this answer















    Yes, the first part indicates that your system is expecting a nameserver to be listening on localhost, in this case, specifically 127.0.0.53.



    The second part is a search path that is appended to all searches not ending in a period (.). If you run, for instance, ssh blah, DNS will first try to look up blah, then try looking up blah.fios-router.home.







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited 8 hours ago









    Jeff Schaller

    41.3k1056131




    41.3k1056131










    answered 9 hours ago









    Doug O'NealDoug O'Neal

    2,9301818




    2,9301818













    • Thanks. I never know the local machine is running a DNS server. Can you tell me how to find out its process?

      – Tim
      9 hours ago











    • Try pgrep systemd-resolved or systemctl status systemd-resolved.

      – telcoM
      8 hours ago











    • @telcoM pgrep systemd-resolved returns nothing. Does nameserver 127.0.0.53 really mean the my local machine is running a DNS server?

      – Tim
      35 mins ago





















    • Thanks. I never know the local machine is running a DNS server. Can you tell me how to find out its process?

      – Tim
      9 hours ago











    • Try pgrep systemd-resolved or systemctl status systemd-resolved.

      – telcoM
      8 hours ago











    • @telcoM pgrep systemd-resolved returns nothing. Does nameserver 127.0.0.53 really mean the my local machine is running a DNS server?

      – Tim
      35 mins ago



















    Thanks. I never know the local machine is running a DNS server. Can you tell me how to find out its process?

    – Tim
    9 hours ago





    Thanks. I never know the local machine is running a DNS server. Can you tell me how to find out its process?

    – Tim
    9 hours ago













    Try pgrep systemd-resolved or systemctl status systemd-resolved.

    – telcoM
    8 hours ago





    Try pgrep systemd-resolved or systemctl status systemd-resolved.

    – telcoM
    8 hours ago













    @telcoM pgrep systemd-resolved returns nothing. Does nameserver 127.0.0.53 really mean the my local machine is running a DNS server?

    – Tim
    35 mins ago







    @telcoM pgrep systemd-resolved returns nothing. Does nameserver 127.0.0.53 really mean the my local machine is running a DNS server?

    – Tim
    35 mins ago















    2














    The search fios-router.home part is the last resolvable domain, i.e. your router (iirc Verizon).



    127.0.0.53 is the IP address of the nameserver, so your assumption is correct.






    share|improve this answer










    New contributor




    Radu Chirovici is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















    • Thanks. (1) What is "a resolvable domain" and what is "the last resolvable domain"? (2) Do you mean my local machine is running a DNS server? Which process is the DNS server?

      – Tim
      9 hours ago


















    2














    The search fios-router.home part is the last resolvable domain, i.e. your router (iirc Verizon).



    127.0.0.53 is the IP address of the nameserver, so your assumption is correct.






    share|improve this answer










    New contributor




    Radu Chirovici is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















    • Thanks. (1) What is "a resolvable domain" and what is "the last resolvable domain"? (2) Do you mean my local machine is running a DNS server? Which process is the DNS server?

      – Tim
      9 hours ago
















    2












    2








    2







    The search fios-router.home part is the last resolvable domain, i.e. your router (iirc Verizon).



    127.0.0.53 is the IP address of the nameserver, so your assumption is correct.






    share|improve this answer










    New contributor




    Radu Chirovici is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.










    The search fios-router.home part is the last resolvable domain, i.e. your router (iirc Verizon).



    127.0.0.53 is the IP address of the nameserver, so your assumption is correct.







    share|improve this answer










    New contributor




    Radu Chirovici is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.









    share|improve this answer



    share|improve this answer








    edited 9 hours ago





















    New contributor




    Radu Chirovici is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.









    answered 9 hours ago









    Radu ChiroviciRadu Chirovici

    215




    215




    New contributor




    Radu Chirovici is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





    New contributor





    Radu Chirovici is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.






    Radu Chirovici is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.













    • Thanks. (1) What is "a resolvable domain" and what is "the last resolvable domain"? (2) Do you mean my local machine is running a DNS server? Which process is the DNS server?

      – Tim
      9 hours ago





















    • Thanks. (1) What is "a resolvable domain" and what is "the last resolvable domain"? (2) Do you mean my local machine is running a DNS server? Which process is the DNS server?

      – Tim
      9 hours ago



















    Thanks. (1) What is "a resolvable domain" and what is "the last resolvable domain"? (2) Do you mean my local machine is running a DNS server? Which process is the DNS server?

    – Tim
    9 hours ago







    Thanks. (1) What is "a resolvable domain" and what is "the last resolvable domain"? (2) Do you mean my local machine is running a DNS server? Which process is the DNS server?

    – Tim
    9 hours ago













    2














    /etc/resolve.conf is the main configuration file for the DNS client, so its presence does not imply that you are running a DNS server.



    Its primary purpose is to list the IP addresses of DNS servers, in your case:




    nameserver 127.0.0.53





    • Entries of type nameserver tell the host, which DNS server to use.

    • An entry of type domain (if present) tells the system which domain it is in. This allows to be addressed by its host name. (Addition in response to a comment: The hostname is the computer's name in the network. On many systems, you can see the hostname in the command prompt; if not, you can find it by using the command hostname.)

    • An entry of type search (if present) would allow computers from different domains to address each other by their respective host names.


    The file is nowadays usually generated by NeteworkManager (for example, on my system, the file starts with the comment "Generated by NetworkManager") or by systemd-resolved.



    systemd-resolved




    is a system service that provides network name resolution to local applications. It implements a caching and validating DNS/DNSSEC stub resolver, as well as an LLMNR and MulticastDNS resolver and responder.




    Also according to systemd-resolved's manpage, the address 127.0.0.53 is a "local DNS stub listener". On related Stack Exchange sites, there have been questions about how to change this, since the file is /etc/resolv.conf is automatically generated. See for example





    • Wrong nameserver set by resolvconf and NetworkManager (Ubuntu SE).


    • DNS set to systemd's 127.0.0.53 - how to change permanently? (Ubuntu SE).






    share|improve this answer





















    • 1





      Thanks. (1) "Entries of type nameserver tell the host, which DNS server to use." 127.0.0.53 is an IP of local machine. How is that not contradictory to "its presence does not imply that you are running a DNS server"? (2) "An entry of type domain (if present) tells the system which domain it is in. This allows to be addressed by its host name." What is the difference and relation between a domain (name) and a host name?

      – Tim
      9 hours ago













    • 1) it is only visible to your local system, not to any other systems; not even within your home network. So it does not serve any others. 2) A hostname might be short (host1) or fully-qualified (host1.fios-router.home). In this example, the domain of host1.fios-router.home would be fios-router.home.

      – telcoM
      8 hours ago











    • So ls -al /etc/resolv.conf and cat /etc/resolv.conf will inform you which program/service is controlling resolv.conf. If you've messed about with your system then you might have a couple of programs competing for control - I had this before with dnsmasq, bind, and systemd-resolved. In addition @Tim, to what telcoM says about your questions: the DNS server and resolver ("stub resolver") can be different, you can pass DNS requests to 127.0.0.53 which pass them to your router for actual DNS (eg it could handle local hosts but pass requests for remote hosts on for full DNS).

      – pbhj
      6 hours ago











    • @pbhj "you can pass DNS requests to 127.0.0.53 which pass them to your router for actual DNS." 127.0.0.53 refers to the local machine itself, so why does it pass DNS request to your router ?

      – Tim
      36 mins ago
















    2














    /etc/resolve.conf is the main configuration file for the DNS client, so its presence does not imply that you are running a DNS server.



    Its primary purpose is to list the IP addresses of DNS servers, in your case:




    nameserver 127.0.0.53





    • Entries of type nameserver tell the host, which DNS server to use.

    • An entry of type domain (if present) tells the system which domain it is in. This allows to be addressed by its host name. (Addition in response to a comment: The hostname is the computer's name in the network. On many systems, you can see the hostname in the command prompt; if not, you can find it by using the command hostname.)

    • An entry of type search (if present) would allow computers from different domains to address each other by their respective host names.


    The file is nowadays usually generated by NeteworkManager (for example, on my system, the file starts with the comment "Generated by NetworkManager") or by systemd-resolved.



    systemd-resolved




    is a system service that provides network name resolution to local applications. It implements a caching and validating DNS/DNSSEC stub resolver, as well as an LLMNR and MulticastDNS resolver and responder.




    Also according to systemd-resolved's manpage, the address 127.0.0.53 is a "local DNS stub listener". On related Stack Exchange sites, there have been questions about how to change this, since the file is /etc/resolv.conf is automatically generated. See for example





    • Wrong nameserver set by resolvconf and NetworkManager (Ubuntu SE).


    • DNS set to systemd's 127.0.0.53 - how to change permanently? (Ubuntu SE).






    share|improve this answer





















    • 1





      Thanks. (1) "Entries of type nameserver tell the host, which DNS server to use." 127.0.0.53 is an IP of local machine. How is that not contradictory to "its presence does not imply that you are running a DNS server"? (2) "An entry of type domain (if present) tells the system which domain it is in. This allows to be addressed by its host name." What is the difference and relation between a domain (name) and a host name?

      – Tim
      9 hours ago













    • 1) it is only visible to your local system, not to any other systems; not even within your home network. So it does not serve any others. 2) A hostname might be short (host1) or fully-qualified (host1.fios-router.home). In this example, the domain of host1.fios-router.home would be fios-router.home.

      – telcoM
      8 hours ago











    • So ls -al /etc/resolv.conf and cat /etc/resolv.conf will inform you which program/service is controlling resolv.conf. If you've messed about with your system then you might have a couple of programs competing for control - I had this before with dnsmasq, bind, and systemd-resolved. In addition @Tim, to what telcoM says about your questions: the DNS server and resolver ("stub resolver") can be different, you can pass DNS requests to 127.0.0.53 which pass them to your router for actual DNS (eg it could handle local hosts but pass requests for remote hosts on for full DNS).

      – pbhj
      6 hours ago











    • @pbhj "you can pass DNS requests to 127.0.0.53 which pass them to your router for actual DNS." 127.0.0.53 refers to the local machine itself, so why does it pass DNS request to your router ?

      – Tim
      36 mins ago














    2












    2








    2







    /etc/resolve.conf is the main configuration file for the DNS client, so its presence does not imply that you are running a DNS server.



    Its primary purpose is to list the IP addresses of DNS servers, in your case:




    nameserver 127.0.0.53





    • Entries of type nameserver tell the host, which DNS server to use.

    • An entry of type domain (if present) tells the system which domain it is in. This allows to be addressed by its host name. (Addition in response to a comment: The hostname is the computer's name in the network. On many systems, you can see the hostname in the command prompt; if not, you can find it by using the command hostname.)

    • An entry of type search (if present) would allow computers from different domains to address each other by their respective host names.


    The file is nowadays usually generated by NeteworkManager (for example, on my system, the file starts with the comment "Generated by NetworkManager") or by systemd-resolved.



    systemd-resolved




    is a system service that provides network name resolution to local applications. It implements a caching and validating DNS/DNSSEC stub resolver, as well as an LLMNR and MulticastDNS resolver and responder.




    Also according to systemd-resolved's manpage, the address 127.0.0.53 is a "local DNS stub listener". On related Stack Exchange sites, there have been questions about how to change this, since the file is /etc/resolv.conf is automatically generated. See for example





    • Wrong nameserver set by resolvconf and NetworkManager (Ubuntu SE).


    • DNS set to systemd's 127.0.0.53 - how to change permanently? (Ubuntu SE).






    share|improve this answer















    /etc/resolve.conf is the main configuration file for the DNS client, so its presence does not imply that you are running a DNS server.



    Its primary purpose is to list the IP addresses of DNS servers, in your case:




    nameserver 127.0.0.53





    • Entries of type nameserver tell the host, which DNS server to use.

    • An entry of type domain (if present) tells the system which domain it is in. This allows to be addressed by its host name. (Addition in response to a comment: The hostname is the computer's name in the network. On many systems, you can see the hostname in the command prompt; if not, you can find it by using the command hostname.)

    • An entry of type search (if present) would allow computers from different domains to address each other by their respective host names.


    The file is nowadays usually generated by NeteworkManager (for example, on my system, the file starts with the comment "Generated by NetworkManager") or by systemd-resolved.



    systemd-resolved




    is a system service that provides network name resolution to local applications. It implements a caching and validating DNS/DNSSEC stub resolver, as well as an LLMNR and MulticastDNS resolver and responder.




    Also according to systemd-resolved's manpage, the address 127.0.0.53 is a "local DNS stub listener". On related Stack Exchange sites, there have been questions about how to change this, since the file is /etc/resolv.conf is automatically generated. See for example





    • Wrong nameserver set by resolvconf and NetworkManager (Ubuntu SE).


    • DNS set to systemd's 127.0.0.53 - how to change permanently? (Ubuntu SE).







    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited 7 hours ago

























    answered 9 hours ago









    Christophe StrobbeChristophe Strobbe

    2071213




    2071213








    • 1





      Thanks. (1) "Entries of type nameserver tell the host, which DNS server to use." 127.0.0.53 is an IP of local machine. How is that not contradictory to "its presence does not imply that you are running a DNS server"? (2) "An entry of type domain (if present) tells the system which domain it is in. This allows to be addressed by its host name." What is the difference and relation between a domain (name) and a host name?

      – Tim
      9 hours ago













    • 1) it is only visible to your local system, not to any other systems; not even within your home network. So it does not serve any others. 2) A hostname might be short (host1) or fully-qualified (host1.fios-router.home). In this example, the domain of host1.fios-router.home would be fios-router.home.

      – telcoM
      8 hours ago











    • So ls -al /etc/resolv.conf and cat /etc/resolv.conf will inform you which program/service is controlling resolv.conf. If you've messed about with your system then you might have a couple of programs competing for control - I had this before with dnsmasq, bind, and systemd-resolved. In addition @Tim, to what telcoM says about your questions: the DNS server and resolver ("stub resolver") can be different, you can pass DNS requests to 127.0.0.53 which pass them to your router for actual DNS (eg it could handle local hosts but pass requests for remote hosts on for full DNS).

      – pbhj
      6 hours ago











    • @pbhj "you can pass DNS requests to 127.0.0.53 which pass them to your router for actual DNS." 127.0.0.53 refers to the local machine itself, so why does it pass DNS request to your router ?

      – Tim
      36 mins ago














    • 1





      Thanks. (1) "Entries of type nameserver tell the host, which DNS server to use." 127.0.0.53 is an IP of local machine. How is that not contradictory to "its presence does not imply that you are running a DNS server"? (2) "An entry of type domain (if present) tells the system which domain it is in. This allows to be addressed by its host name." What is the difference and relation between a domain (name) and a host name?

      – Tim
      9 hours ago













    • 1) it is only visible to your local system, not to any other systems; not even within your home network. So it does not serve any others. 2) A hostname might be short (host1) or fully-qualified (host1.fios-router.home). In this example, the domain of host1.fios-router.home would be fios-router.home.

      – telcoM
      8 hours ago











    • So ls -al /etc/resolv.conf and cat /etc/resolv.conf will inform you which program/service is controlling resolv.conf. If you've messed about with your system then you might have a couple of programs competing for control - I had this before with dnsmasq, bind, and systemd-resolved. In addition @Tim, to what telcoM says about your questions: the DNS server and resolver ("stub resolver") can be different, you can pass DNS requests to 127.0.0.53 which pass them to your router for actual DNS (eg it could handle local hosts but pass requests for remote hosts on for full DNS).

      – pbhj
      6 hours ago











    • @pbhj "you can pass DNS requests to 127.0.0.53 which pass them to your router for actual DNS." 127.0.0.53 refers to the local machine itself, so why does it pass DNS request to your router ?

      – Tim
      36 mins ago








    1




    1





    Thanks. (1) "Entries of type nameserver tell the host, which DNS server to use." 127.0.0.53 is an IP of local machine. How is that not contradictory to "its presence does not imply that you are running a DNS server"? (2) "An entry of type domain (if present) tells the system which domain it is in. This allows to be addressed by its host name." What is the difference and relation between a domain (name) and a host name?

    – Tim
    9 hours ago







    Thanks. (1) "Entries of type nameserver tell the host, which DNS server to use." 127.0.0.53 is an IP of local machine. How is that not contradictory to "its presence does not imply that you are running a DNS server"? (2) "An entry of type domain (if present) tells the system which domain it is in. This allows to be addressed by its host name." What is the difference and relation between a domain (name) and a host name?

    – Tim
    9 hours ago















    1) it is only visible to your local system, not to any other systems; not even within your home network. So it does not serve any others. 2) A hostname might be short (host1) or fully-qualified (host1.fios-router.home). In this example, the domain of host1.fios-router.home would be fios-router.home.

    – telcoM
    8 hours ago





    1) it is only visible to your local system, not to any other systems; not even within your home network. So it does not serve any others. 2) A hostname might be short (host1) or fully-qualified (host1.fios-router.home). In this example, the domain of host1.fios-router.home would be fios-router.home.

    – telcoM
    8 hours ago













    So ls -al /etc/resolv.conf and cat /etc/resolv.conf will inform you which program/service is controlling resolv.conf. If you've messed about with your system then you might have a couple of programs competing for control - I had this before with dnsmasq, bind, and systemd-resolved. In addition @Tim, to what telcoM says about your questions: the DNS server and resolver ("stub resolver") can be different, you can pass DNS requests to 127.0.0.53 which pass them to your router for actual DNS (eg it could handle local hosts but pass requests for remote hosts on for full DNS).

    – pbhj
    6 hours ago





    So ls -al /etc/resolv.conf and cat /etc/resolv.conf will inform you which program/service is controlling resolv.conf. If you've messed about with your system then you might have a couple of programs competing for control - I had this before with dnsmasq, bind, and systemd-resolved. In addition @Tim, to what telcoM says about your questions: the DNS server and resolver ("stub resolver") can be different, you can pass DNS requests to 127.0.0.53 which pass them to your router for actual DNS (eg it could handle local hosts but pass requests for remote hosts on for full DNS).

    – pbhj
    6 hours ago













    @pbhj "you can pass DNS requests to 127.0.0.53 which pass them to your router for actual DNS." 127.0.0.53 refers to the local machine itself, so why does it pass DNS request to your router ?

    – Tim
    36 mins ago





    @pbhj "you can pass DNS requests to 127.0.0.53 which pass them to your router for actual DNS." 127.0.0.53 refers to the local machine itself, so why does it pass DNS request to your router ?

    – Tim
    36 mins ago











    1














    resolv.conf is part of the standard way to resolve a host name to an IP address. It is part of the resolver library.



    There are different ways to resolve your host name:




    • files (specifically: /etc/hosts)

    • dns

    • NIS, NIS+ or yp


    The sequence in which they are used is in /etc/nsswitch.conf. This normally says



    hosts:      files dns


    which means that the resolver library first looks in /etc/hosts and, if it cannot find it there, will use DNS.



    Now DNS will query a DNS server. Which one is determined by /etc/resolv.conf. In addition, there are a number of additional parameters that you can use to help the DNS reolution, of which search (Try this domain first for the host) is probably the most used.






    share|improve this answer




























      1














      resolv.conf is part of the standard way to resolve a host name to an IP address. It is part of the resolver library.



      There are different ways to resolve your host name:




      • files (specifically: /etc/hosts)

      • dns

      • NIS, NIS+ or yp


      The sequence in which they are used is in /etc/nsswitch.conf. This normally says



      hosts:      files dns


      which means that the resolver library first looks in /etc/hosts and, if it cannot find it there, will use DNS.



      Now DNS will query a DNS server. Which one is determined by /etc/resolv.conf. In addition, there are a number of additional parameters that you can use to help the DNS reolution, of which search (Try this domain first for the host) is probably the most used.






      share|improve this answer


























        1












        1








        1







        resolv.conf is part of the standard way to resolve a host name to an IP address. It is part of the resolver library.



        There are different ways to resolve your host name:




        • files (specifically: /etc/hosts)

        • dns

        • NIS, NIS+ or yp


        The sequence in which they are used is in /etc/nsswitch.conf. This normally says



        hosts:      files dns


        which means that the resolver library first looks in /etc/hosts and, if it cannot find it there, will use DNS.



        Now DNS will query a DNS server. Which one is determined by /etc/resolv.conf. In addition, there are a number of additional parameters that you can use to help the DNS reolution, of which search (Try this domain first for the host) is probably the most used.






        share|improve this answer













        resolv.conf is part of the standard way to resolve a host name to an IP address. It is part of the resolver library.



        There are different ways to resolve your host name:




        • files (specifically: /etc/hosts)

        • dns

        • NIS, NIS+ or yp


        The sequence in which they are used is in /etc/nsswitch.conf. This normally says



        hosts:      files dns


        which means that the resolver library first looks in /etc/hosts and, if it cannot find it there, will use DNS.



        Now DNS will query a DNS server. Which one is determined by /etc/resolv.conf. In addition, there are a number of additional parameters that you can use to help the DNS reolution, of which search (Try this domain first for the host) is probably the most used.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 9 hours ago









        Ljm DullaartLjm Dullaart

        63629




        63629






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f499993%2fhow-shall-i-understand-the-format-of-etc-resolv-conf%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Magento 2 controller redirect on button click in phtml file

            Polycentropodidae