Use dig to query the configured resolver for the IPv4 address record of app.example.test.
Which command is appropriate?
dig NAME A sends an A query to the configured resolver and displays IPv4 addresses in the answer section.
Detailed explanation
dig app.example.test ACorrect. It queries the A record for the name.
Correct. It queries the A record for the name.
dig app.example.test MXIncorrect. MX queries mail exchanger records.
Incorrect. MX queries mail exchanger records.
dig A app.example.test PTRIncorrect. It adds an unnecessary PTR and places the query form incorrectly.
Incorrect. It adds an unnecessary PTR and places the query form incorrectly.
dig --hosts app.example.testIncorrect. dig does not query only /etc/hosts with a --hosts option.
Incorrect. dig does not query only /etc/hosts with a --hosts option.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' 'dig app.example.test A -> DNS type A query'Expected result
dig app.example.test A -> DNS type A queryKey points
- A is an IPv4 address record
- Put the type after the name
- Use the configured resolver
Notes
- Environment: dig構文の表示のみ(DNS通信なし)
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.