如何在CentOS上安装dig?


91

dig在新安装的CentOS上找不到该命令。我已经尝试过了,yum install dig但是它说找不到包。

如何在CentOS上安装dig?

Answers:



61

您已经提供了具体答案,但是如果您要查找其他可执行文件或文件以查看它们安装了什么软件包,请利用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.
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.