Query the A record for app.example.test directly from DNS server 192.0.2.53.
Print only the answer value.
Which command is appropriate?
dig uses @SERVER to select the resolver, NAME and TYPE to select the query, and +short for concise answer output.
Detailed explanation
dig app.example.test 192.0.2.53 +shortIncorrect. The server must be prefixed with @.
Incorrect. The server must be prefixed with @.
dig +server 192.0.2.53 app.example.test AIncorrect. +server is not dig's server-selection syntax.
Incorrect. +server is not dig's server-selection syntax.
dig @192.0.2.53 app.example.test A +traceIncorrect. +trace follows referrals from the root and is not a concise direct query.
Incorrect. +trace follows referrals from the root and is not a concise direct query.
dig @192.0.2.53 app.example.test A +shortCorrect. It queries the chosen server for the A record and prints a short answer.
Correct. It queries the chosen server for the A record and prints a short answer.
Try it yourself
An example you can run in a temporary verification environment.
dig -h 2>&1 | sed -n '1,8p'Expected result
digの@server、name、typeなどの使用方法Key points
- @ selects the DNS server
- A is the IPv4 address record
- +short keeps output concise
Notes
- Environment: BIND dig help / 外部問い合わせなし
- 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.