跳至主要内容

博文

目前显示的是 五月, 2022的博文

How To Set Permanent DNS Nameservers in Ubuntu and Debian

  The   /etc/resolv.conf   is the main configuration file for the   DNS   name resolver library. The resolver is a set of functions in the C library that provide access to the   Internet Domain Name System   ( DNS ). The functions are configured to check entries in the   /etc/hosts   file, or several DNS name servers, or to use the host’s database of   Network Information Service   ( NIS ). On modern Linux systems that use  systemd  (system and service manager), the  DNS  or  name resolution  services are provided to local applications via the  systemd-resolved  service. By default, this service has four different modes for handling the Domain name resolution and uses the systemd DNS stub file ( /run/systemd/resolve/stub-resolv.conf ) in the default mode of operation. The DNS stub file contains the local  stub 127.0.0.53  as the only DNS server, and it is redirected to the  /etc/resolv.conf  file which was used to add the name servers used by the system. If you run the following  ls co