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.
server=192.0.2.53Incorrect. server= is not the resolv.conf nameserver directive.
dns: 192.0.2.53Incorrect. This is not a standard resolv.conf form.
192.0.2.53 nameserverIncorrect. 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
nameserver
A resolver directive that identifies a DNS server to query.
/etc/resolv.conf
The local file that configures resolver servers and query behavior.
Resolver configuration
Settings used when applications request name resolution.