10 Linux DIG Command Examples for DNS Lookup--reference
|
副标题[/!--empirenews.page--]
by??on? Dig stands for domain information groper. Using dig command you can query DNS name servers for your DNS lookup related tasks. This article explains 10 examples on how to use dig command. 1. Simple dig Command Usage (Understand dig Output)When you pass a domain name to the dig command,by default it displays the A record (the ip-address of the site that is queried) as shown below.In this example,it displays the A record of redhat.com in the “ANSWER SECTION” of the dig command output. $ dig redhat.com The dig command output has the following sections:
2. Display Only the ANSWER SECTION of the Dig command OutputFor most part,all you need to look at is the “ANSWER SECTION” of the dig command. So,we can turn off all other sections as shown below.
The following dig command displays only the ANSWER SECTION. $ dig redhat.com +nocomments +noquestion +noauthority +noadditional +nostats Instead of disabling all the sections that we don’t want one by one,we can disable all sections using +noall (this turns off answer section also),and add the +answer which will show only the answer section. The above command can also be written in a short form as shown below,which displays only the ANSWER SECTION. $ dig redhat.com +noall +answer 3. Query MX Records Using dig -t MXTo query MX records,pass MX as an argument to the dig command as shown below. $ dig redhat.com MX +noall +answer You can also use option -t to pass the query type (for example: MX) as shown below. $ dig -t MX redhat.com +noall +answer 4. Query NS Records Using dig -t NSTo query the NS record use the type NS as shown below. $ dig redhat.com NS +noall +answer
|
- redhat – Kickstart:通过CGI或PHP脚本提供动态
- Ubuntu Unity Remix 20.04非官方风味稳定版本正式
- Ubuntu Touch OTA-12首次发布,为有史以来最大版
- ssh – 可以在Linux(ext3)上减慢日志写入速度吗?
- Ubuntu Studio 20.10抛弃Xfce桌面转向更高级的KD
- linux – 使用systemd服务单元的Restartamp;Rest
- 解决Manjaro Linux无法安装搜狗拼音
- Linux文件操作之文件查询与搜索命令分析
- AMDVLK 2020.Q2.3 发布,新扩展与各种完善
- Find command usage in Linux with excellent ex


