Linux command ($): nslookup command-domain search tool

Source: Internet
Author: User
Tags nslookup nslookup command

nslookup command

Function description

The nslookup command, a common network command under Windows and Linux, can be used to query or diagnose Domain Name System (DNS) information.

Linux under the Domain Name Query tool has nsloouup, dig, host

Centos7, due to the use of minimal installation, the default is not with this command, the following is the installation command demo:

[Email protected] ~]#nslookup                        #提示没有找到命令

-bash:nslookup: Command not found

[Email protected] ~]# Yum provides */nslookup #查询nslookup使用哪个软件包

Loaded plugins: Fastestmirror

Loading mirror speeds from cached hostfile

* base:mirrors.neusoft.edu.cn

* extras:mirrors.tuna.tsinghua.edu.cn

* updates:mirrors.tuna.tsinghua.edu.cn #查询到是使用bind-utils Package

:bind-utils-9.9.4-29.el7.x86_64:utilities for querying DNS name servers

Source: Base

Match Source:

File name:/usr/bin/nslookup

[[email protected] ~]# yum-y install bind-utils #安装该bind-utils Package

[Email protected] ~]# nslookup

> www.baidu.com

server:219.141.140.10

address:219.141.140.10#53


Non-authoritative Answer:

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

Name:www.a.shifen.com

address:220.181.112.244

Name:www.a.shifen.com

address:220.181.111.188

>

Example

intercept the IP address of the server

[Email protected] shell]# nslookup z.cn

server:114.114.114.114

address:114.114.114.114#53


Non-authoritative Answer:

name:z.cn

address:54.222.60.252


[Email protected] shell]# nslookup z.cn | tail-2 | head-1 | awk ' {print $} '

54.222.60.252

[Email protected] shell]#


This article is from the "Zhao Dongwei blog" blog, make sure to keep this source http://zhaodongwei.blog.51cto.com/4233742/1881036

Linux command ($): nslookup command-domain search tool

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.