312-50V10 · Question #786
Which of the following Linux commands will resolve a domain name into IP address?
The correct answer is A. >host-t a hackeddomain.com. The Linux 'host' command with the '-t a' flag queries the DNS A record for a domain, which maps a hostname to its IPv4 address. This is the standard method for resolving a domain name to an IP address from the command line.
Question
Which of the following Linux commands will resolve a domain name into IP address?
Options
- A
host-t a hackeddomain.com
- B
host-t ns hackeddomain.com
- C
host -t soa hackeddomain.com
- D
host -t AXFR hackeddomain.com
How the community answered
(43 responses)- A93% (40)
- B2% (1)
- C5% (2)
Why each option
The Linux 'host' command with the '-t a' flag queries the DNS A record for a domain, which maps a hostname to its IPv4 address. This is the standard method for resolving a domain name to an IP address from the command line.
The command 'host -t a hackeddomain.com' queries the DNS system specifically for the A (address) record type, which contains the IPv4 address mapped to the given domain name. The '-t' flag specifies the query type, and 'a' targets the address record, making this the correct choice for domain-to-IP resolution.
'host -t ns hackeddomain.com' queries for NS (Name Server) records, which return the authoritative DNS servers for the domain, not an IP address.
'host -t soa hackeddomain.com' queries for the SOA (Start of Authority) record, which returns administrative information about the DNS zone, not an IP address.
'host -t AXFR hackeddomain.com' attempts a DNS zone transfer to retrieve all DNS records for a domain, not simply to resolve a domain name to an IP address.
Concept tested: DNS A record query using the host command
Source: https://linux.die.net/man/1/host
Topics
Community Discussion
No community discussion yet for this question.