312-50V11 · 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 -t a' command queries DNS for A records, which map a domain name directly to its IPv4 address.
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
(16 responses)- A94% (15)
- D6% (1)
Why each option
The Linux 'host -t a' command queries DNS for A records, which map a domain name directly to its IPv4 address.
The 'host -t a' command specifically requests the DNS A (address) record type for a domain, which returns the associated IPv4 address. This is the standard command-line method to perform forward DNS resolution from a hostname to an IP address.
The '-t ns' flag queries for NS (Name Server) records, which return the authoritative DNS servers for the domain rather than an IP address.
The '-t soa' flag queries for the Start of Authority record, which contains administrative zone information such as serial number and refresh intervals, not the domain's IP address.
The '-t AXFR' flag requests a full DNS zone transfer to retrieve all records in a zone - this is a reconnaissance technique, not a simple hostname-to-IP resolution.
Concept tested: DNS A record query using Linux host command
Source: https://linux.die.net/man/1/host
Topics
Community Discussion
No community discussion yet for this question.