Configure the DNS client to query resolver 192.0.2.53 through /etc/resolv.conf.
Which line is appropriate?
/etc/resolv.conf uses nameserver ADDRESS to specify a resolver address. Behavior with multiple entries depends on the resolver implementation.
Detailed explanation
nameserver 192.0.2.53Correct. It sets 192.0.2.53 as a DNS nameserver.
Correct. It sets 192.0.2.53 as a DNS nameserver.
server=192.0.2.53Incorrect. server= is not the resolv.conf nameserver directive.
Incorrect. server= is not the resolv.conf nameserver directive.
dns: 192.0.2.53Incorrect. This is not a standard resolv.conf form.
Incorrect. This is not a standard resolv.conf form.
192.0.2.53 nameserverIncorrect. The directive must precede the address.
Incorrect. The directive must precede the address.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' 'nameserver 192.0.2.53' | awk '{print $1, $2}'Expected result
nameserver 192.0.2.53Key points
- nameserver comes first
- Specify an IP address
- It is a resolver-client setting
Notes
- Environment: POSIX awk / 一時標準入力のみ
- 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.