nerdexam
Linux_Foundation

LFCS · Question #232

Which of the following is the purpose of the dig command?

The correct answer is D. To perform hostname lookups. The dig command (Domain Information Groper) is a powerful tool used to query DNS nameservers for various DNS record types.

Submitted by deeparc· Apr 18, 2026Networking

Question

Which of the following is the purpose of the dig command?

Options

  • ATo adjust a directory's hidden permissions
  • BTo search for files on the filesystem
  • CTo adjust a file's hidden permissions
  • DTo perform hostname lookups
  • ETo ping all known hosts on the current subnet

How the community answered

(28 responses)
  • A
    4% (1)
  • D
    96% (27)

Why each option

The `dig` command (Domain Information Groper) is a powerful tool used to query DNS nameservers for various DNS record types.

ATo adjust a directory's hidden permissions

The `dig` command has no functionality related to adjusting directory permissions.

BTo search for files on the filesystem

File system searches are typically performed using commands like `find` or `locate`, not `dig`.

CTo adjust a file's hidden permissions

The `dig` command has no functionality related to adjusting file permissions.

DTo perform hostname lookupsCorrect

The `dig` command is specifically designed to perform DNS lookups and troubleshoot DNS-related issues, allowing users to query nameservers directly for domain information such as A, MX, and NS records for a given hostname.

ETo ping all known hosts on the current subnet

Pinging hosts to test network reachability is done with the `ping` command, not `dig`.

Concept tested: DNS hostname lookups with `dig`

Source: https://man7.org/linux/man-pages/man1/dig.1.html

Topics

#dig command#DNS lookup#Hostname resolution#Networking tools

Community Discussion

No community discussion yet for this question.

Full LFCS Practice