dig、host 與 nslookup 指令的查詢語法

在 Linux 下執行 nslookup 指令都會出現下列訊息:

Note: nslookup is deprecated and may be removed from future releases.
Consider using the `dig' or `host' programs instead. Run nslookup with
the `-sil[ent]' option to prevent this message from appearing.

告訴你使用 dig 或 host 指令來取代 nslookup,但可惜在 Windows 系統並沒有 dig 與 host 指令。

以下是 dig、host 與 nslookup 的查詢語法:

dig:

dig @NameServer 網域名稱 Type

host:

host -t Type 網域名稱 NameServer

nslookup:

nslookup -type=Type 網域名稱 NameServer

其中 Type 的參數有

  1. any
  2. a: 查 IP Address
  3. mx: 查郵件伺服器
  4. ns: 查名稱伺服器
  5. cname: 查別名
  6. ptr: 由 IP Address 反查網域名稱
  7. hinfo: 查伺服器的系統資訊
  1. Using Google Chrome Google Chrome 24.0.1312.57 on Windows Windows 7

    很好的总结,比网上那些写的条理清晰的多,dig命令还是比较好用的。

  2. Using Google Chrome Google Chrome 64.0.3282.140 on Windows Windows NT

    DiG GUI - dig命令网页接口,挖掘DNS的秘密。
    https://www.diggui.com/

  1. 11/18. 2008

return top

%d 位部落客按了讚: