• Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • Categories
    Category
    {{ postCtrl.tags }}
    • {{ category.tag_type }}

      • {{tag.tag_name}}
      • View more
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial News Comments FAQ Related Articles

How to set Permanent DNS Nameservers on Debian 11.3

  • 00:25 lsb_release -a
  • 00:38 apt install resolvconf
  • 00:58 systemctl start resolvconf.service
  • 01:16 systemctl enable resolvconf.service
  • 01:40 systemctl status resolvconf.service
  • 02:02 nano /etc/resolvconf/resolv.conf.d/head
  • 02:50 resolvconf -u
  • 03:02 nano /etc/resolv.conf
{{postValue.id}}

To Set Permanent DNS Nameservers On Debian 11.3

Introduction

DNS stands for Domain Name System server, which is responsible for translating a domain name into an IP address. Using custom DNS servers on Linux can improve performance and security.

Installation Procedure:

Step 1: Check the OS version by using the below command

root@linuxhelp: ~# lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 11 (bullseye)
Release:	11
Codename:	bullseye

Step 2: Install the resolvconf package by using the below command

root@linuxhelp: ~# apt install resolvconf
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  resolvconf
0 upgraded, 1 newly installed, 0 to remove and 263 not upgraded.
Need to get 54.7 kB of archives.
After this operation, 203 kB of additional disk space will be used.
Get:1 http://in.archive.Debian.com/ubuntu hirsute/universe amd64 resolvconf all 1.84ubuntu1 [54.7 kB]

Fetched 54.7 kB in 6s (9,526 B/s)     
Preconfiguring packages ...
Selecting previously unselected package resolvconf.
(Reading database ... 151399 files and directories currently installed.)
Preparing to unpack .../resolvconf_1.84Debian1_all.deb ...
Unpacking resolvconf (1.84Debian1) ...
Setting up resolvconf (1.84Debian1) ...
Created symlink /etc/systemd/system/sysinit.target.wants/resolvconf.service → /lib/systemd/system/resolvconf.service.
Created symlink /etc/systemd/system/systemd-resolved.service.wants/resolvconf-pull-resolved.path → /lib/systemd/system/resolvconf-pull-resolved.path.
Created symlink /etc/systemd/system/systemd-resolved.service.wants/resolvconf-pull-resolved.service → /lib/systemd/system/resolvconf-pull-resolved.service.

Step 3: Start the resolvconf service by using the below command

root@linuxhelp:~# systemctl start resolvconf.service

Step 4: Enable the resolvconf service by using the below command

root@linuxhelp:~# systemctl enable resolvconf.service
Synchronizing state of resolvconf.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable resolvconf

Step 5: Check the status of the resolvconf service by using the below command

root@linuxhelp:~# systemctl status resolvconf.service
● resolvconf.service - Nameserver information manager
     Loaded: loaded (/lib/systemd/system/resolvconf.service; enabled; vendor preset: enabled)
     Active: active (exited) since Sat 2021-10-30 22:53:19 IST; 1min 55s ago
       Docs: man:resolvconf(8)
   Main PID: 6298 (code=exited, status=0/SUCCESS)
      Tasks: 0 (limit: 2257)
     Memory: 0B
     CGroup: /system.slice/resolvconf.service

Step 6: Enter the nameservers in the resolv.conf.d by using the below command

root@linuxhelp:~# nano /etc/resolvconf/resolv.conf.d/head

snap 1

Step 7: Update the resolvconf by using the below command

root@linuxhelp:~# resolvconf -u

Step 8: Check the nameserver entry reflected in resolv.conf by using the below command

root@linuxhelp:~# nano /etc/resolv.conf 

snap 2

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to Set Permanent DNS Nameservers on Debian 11.3. Your feedback is much welcome.

Tags:
caden
Author: 

Comments ( 0 )

No comments available

Add a comment
{{postCtrl.cmtErrMsg}}

Frequently asked questions ( 5 )

Q

Why DNS entry in resolv.conf disables?

A

It is a dynamic file, resolv.conf, on every reboot it auto-resets to its default settings.

Q

Where is the location of the static DNS file?

A

It is located in /etc/resolvconf/resolv.conf.d/

Q

What is meant by DNS?

A

DNS, or the domain name system, is the phonebook of the Domains.

Q

How to Find My DNS Server IP Address

A

We can find the DNS Server IP Address by using the following command "cat /etc/resolv.conf"

Q

What is Resolvconf?

A

It is the file used in various operating systems to configure the system's DNS resolver.

Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help legeek ?
Installation of the call center module

hello

I wish to install a call center in virtual with issabel, I downloaded the latest version of it , but I don' t arrive to install the call center module in issabel. please help me

thanks!

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.