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

Linux basic command-nslookup query domain name tool

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

Nslookup

Nslookup is a tool for querying DNS domain names. It works in both interactive and non-interactive modes.

The scope of application of this command: RedHat, RHEL, Ubuntu, CentOS, Fedora.

1. Grammar

Nslookup [- option] [name | -] [server]

2. After entering the interactive mode, you have the following command

Command

Description

Host

Query the information of host

Server domain

Change the server

Exit

Quit

Set keyword= value

Set specified properties

All, print all the properties

Domain=name sets the name of the query

Port=value changes the server port

Type=value changes the type of query

Timeout=number set wait timeout

Class= {IN | CH | HS | ANY}

3. Examples

1) non-interactive mode query

[root@localhost ~] # nslookup www.baidu.com

Server: 172.20.10.1

Address: 172.20.10.1#53

Non-authoritative answer:

Www.baidu.com canonical name = www.a.shifen.com.

Name: www.a.shifen.com

Address: 111.13.100.91

Name: www.a.shifen.com

Address: 111.13.100.92

2) Interactive mode query

[root@localhost ~] # nslookup / / interaction mode

> www.baidu.com / / enter the domain name to be queried

Server: 172.20.10.1

Address: 172.20.10.1#53

Non-authoritative answer:

Www.baidu.com canonical name = www.a.shifen.com.

Name: www.a.shifen.com

Address: 111.13.100.91

Name: www.a.shifen.com

Address: 111.13.100.92

> set all / / print all current configuration information

Default server: 172.20.10.1

Address: 172.20.10.1#53

Set options:

Novc nodebug nod2

Search recurse

Timeout = 0 retry = 3 port = 53

Querytype = A class = IN

Srchlist =

>

A Linux learning platform has been made, and a prototype has come out at present, which you can refer to and use.

Link: https://pan.baidu.com/s/1GOLVU2CbpBNGtunztVpaCQ password: n7bk

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

Servers

Wechat

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

12
Report