Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to view and modify DNS server in Linux

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article shows you how to view and modify the DNS server in Linux, the content is concise and easy to understand, it will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

DNS server is for domain name and corresponding IP conversion, it is a way to manage names, DNS can achieve name resolution of the hierarchical database.

View DNS server

Method 1: cat / etc/resolv.conf

[root@6000m ~] # cat / etc/resolv.conf# Generated by NetworkManagersearch localdomainnameserver 172.16.1.1nameserver 192.168.171.212345

Method 2: nslookup command

[root@6000m ~] # nslookup www.baidu.comServer: 172.16.1.1 / / dns server IP address Address: 172.16.1.1y53 / / dns server IP address Non-authoritative answer:www.baidu.com canonical name = www.a.shifen.com.Name: www.a.shifen.comAddress: 61.135.169.121 / / Baidu server IPName: Www.a.shifen.comAddress: 61.135.169.125 / / Baidu server IP12345678910

Method 3: dig command

[root@6000m ~] # dig | grep SERVER;; SERVER: 172.16.1.1 modify DNS server (172.16.1.1) 12

Modify the configuration file / etc/resolv.conf, which can take effect directly after modification

[root@6000m] # vim / etc/resolv.conf# Generated by NetworkManagersearch localdomainnameserver 8.8.8.8nameserver 114.114.114.11412345

View via nslookup

[root@6000m ~] # nslookup www.baidu.comServer: 8.8.8.8Address: 8.8.8.8#53Non-authoritative answer:www.baidu.com canonical name = www.a.shifen.com.www.a.shifen.com canonical name = www.wshifen.com.Name: www.wshifen.comAddress: 103.235.46.39

DNS plays an important role in surfing the Internet at ordinary times. If you don't pay attention to DNS, it may lead to a series of problems, such as slow Internet speed, pop-up ads, unable to open web sites, and so on.

The above is how to view and modify the DNS server in Linux. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report