Centos

如何在 CentOS 上安裝 dig?

  • February 6, 2021

dig我在新的 CentOS 安裝中找不到該命令。我試過dnf install dig了,但它說找不到包裹。

如何在 CentOS 上安裝 dig?

DIG工具是BIND Utilities的一部分,因此您需要安裝它們。要安裝 BIND 實用程序,請鍵入以下內容:

$ dnf install bind-utils

您已經提供了具體的答案,但是如果您正在尋找其他執行檔或文件以查看它們安裝的軟體包,請使用yum whatprovides *relative/path/to/file*,例如:

$ yum whatprovides '*bin/dig'

32:bind-utils-9.8.2-0.17.rc1.el6_4.6.x86_64 : Utilities for querying DNS name servers
Repo        : base
Matched from:
Filename    : /usr/bin/dig
...

來自man yum

provides or whatprovides
   Is  used to find out which package provides some feature or file. Just
   use a specific name or a file-glob-syntax wildcards to list the  pack-
   ages available or installed that provide that feature or file.

引用自:https://unix.stackexchange.com/questions/121874