{{Header}} {{#seo: |description=DNS }}
/etc/resolv.conf
file. A DNS-resolving client such as Unbound is optional and not strictly required for basic DNS resolution.
== /etc/resolv.conf ==
* '''Purpose''': The /etc/resolv.conf
file is a standard configuration file in Linux systems used by DNS resolver libraries (like glibc
) to determine how to perform DNS resolution.
* '''Contents''': It typically contains information such as:
** nameserver
directives specifying the IP addresses of DNS servers.
** search
domains and options
for resolving queries.
== DNS Resolver Libraries ==
* These libraries are part of most Linux systems and use /etc/resolv.conf
to send DNS queries to the specified nameservers.
* The libraries themselves handle basic DNS resolution without needing an external DNS resolver client.
== DNS Resolver Clients ==
E.g., unbound
, systemd-resolved
.
* '''Optional''': External DNS resolving software like unbound
or systemd-resolved
is not strictly required for basic DNS resolution.
* '''Purpose''': These tools provide additional functionality, such as caching, advanced DNSSEC validation, or recursive DNS resolution.
* '''Integration''': When such a resolver is used, /etc/resolv.conf
might point to 127.0.0.1
(localhost), as the local resolver handles DNS queries before forwarding them.
== Summary ==
* Basic DNS resolution on Linux relies on resolver libraries using /etc/resolv.conf
.
* External DNS resolving clients like unbound
are optional and primarily used to enhance DNS functionality. They are not required for basic operations if a valid nameserver is defined in /etc/resolv.conf
.
= Enabling systemd-resolved =
[[Untested]]!
{{Testers-only}}
{{AdvancedUsersOnly}}
{{CodeSelect|code=
sudo touch /etc/dns-enable
}}
{{CodeSelect|code=
sudo apt install systemd-resolved
}}
{{CodeSelect|code=
sudo systemctl enable systemd-resolved
}}
{{CodeSelect|code=
sudo systemctl start systemd-resolved
}}
{{reflist|close=1}}
{{Footer}}
[[Category:Documentation]]