Use the configured resolver to check the result for app.example.test.
Do not change DNS or hosts configuration.
Which command is appropriate?
host NAME queries the configured resolver for the specified name. An IP address can be supplied for reverse lookup.
Detailed explanation
hostname app.example.testIncorrect. It would request a hostname change.
Incorrect. It would request a hostname change.
route app.example.testIncorrect. route handles routing, not DNS queries.
Incorrect. route handles routing, not DNS queries.
host app.example.testCorrect. host queries the configured resolver for the name.
Correct. host queries the configured resolver for the name.
ifconfig app.example.testIncorrect. ifconfig treats the value as an interface-style argument.
Incorrect. ifconfig treats the value as an interface-style argument.
Try it yourself
An example you can run in a temporary verification environment.
host -h 2>&1 | sed -n '1,6p'Expected result
hostの名前・サーバー指定などの使用方法Key points
- host performs DNS lookup
- Pass a name as the argument
- It does not modify configuration
Notes
- Environment: BIND host 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.