Nslookup: command not found error on RHEL/CentOS 7

  • During linux installation I selected "minimal" option:

    enter image description here

    When I went to run the nslookup command to look up an IP address I got the error message nslookup: command not found as shown in the example below.

    $ nslookup www.google.com
    bash: nslookup: command not found
    

    Have you tried installing the `bind-utils` package, which includes the `nslookup` binary?

  • Steven D

    Steven D Correct answer

    6 years ago

    The minimal install likely did not come with the bind-utils package, which I believe contains nslookup.

    You can install bind-utils with:

    sudo yum install bind-utils
    

    In general, you can search for what package provides a command using the yum provides command:

    sudo yum provides '*bin/nslookup'
    

    Or if you don't know where the command should live, `*/nslookup`.

    I get `package bind-utils not found`

    @Black If you are using `ubuntu`, use `apt-get install dnsutils -y` instead.

    Also for Arch `dnsutils`

License under CC-BY-SA with attribution


Content dated before 6/26/2020 9:53 AM