Get the App
SLTechnology News&Howtos  ›  Servers  › 

Installation and use of nslookup and dig in Linux system

Shulou Source: shulou.com Published: 2022-06-01 12:32:58 11月17日 Update

This article mainly explains "the installation and use of nslookup and dig in the Linux system". The content in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's ideas to study and learn "the installation and use of nslookup and dig in the Linux system".

Fedora / Centos system:

Yum-y install bind-utils

Debian / Ubuntu system:

Apt-get-y install dnsutils

A brief introduction to how to use nslookup to check DNS information.

1. Enter the command in the terminal: nslookup

2. Set the DNS server used by nslookup, enter server DNS_server_ip and enter enter

3. Check the MX record of a DNS domain name. Enter set q=mx first, and then enter the DNS domain name you want to check, such as teddysun.com.

4. To display other records, enter set q=any first, and then enter the name of the record you want to query, as shown in the following figure.

This paper briefly introduces the method of querying DNS using the dig command.

1. This is a query with comments. The command is as follows:

Dig teddysun.com

The output is as follows:

; DiG 9.8.2rc1-RedHat-9.8.2-0.17.rc1.el6_4.4 teddysun.com

;; global options: + cmd

;; Got answer:

;;-> > HEADER

Tags: Query system input output command result domain name learning check content method information name address header that is idea situation data article Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei MySQL macOS Redmi vpn