Vidyalelo
Computer Science · Q12

Linux

Engineering and GATE · Computer Science · question 12

Q12

What file specifies the order in which to use specified name services?

A.
/etc/services
B.
/etc/nsorder
C.
/etc/nsswitch.conf
Answer
D.
/etc/hosts
E.
None of the above

Answer: Option C

Solution

Answer: Option C
Solution:
The /etc/nsswitch.conf file specifies the order in which to use specified name services in Linux.
This file controls how the system resolves various services, such as hostnames, user names, and group names, by defining the sources to query in a specific order.
For example, it determines whether to look in files like /etc/hosts or to query DNS servers for hostname resolution.
By configuring this file, administrators can control the order in which different name resolution methods are attempted, providing flexibility and customization.
So, in summary, the file that specifies the order of name services is /etc/nsswitch.conf.