Difficulty: Easy
Correct Answer: ypwhich
Explanation:
Introduction / Context:
Network Information Service (NIS), formerly known as Yellow Pages (YP), centralizes user, group, and other administrative maps. Troubleshooting NIS often requires confirming which server the client is bound to. Several commands exist, each with a distinct purpose, and knowing which one reveals the current server is fundamental.
Given Data / Assumptions:
Concept / Approach:
The ypwhich command queries the local binding and prints the hostname of the NIS server that the client is currently using. Other commands have different roles: ypbind manages binding; ypcat prints the contents of a map; yppoll queries a map's order number and master but is not primarily used to display the bound server for the client itself.
Step-by-Step Solution:
Identify the task: display the current NIS server.Match functionality: ypwhich reports the NIS server.Exclude tools with different purposes (binding, map content, map order).Select ypwhich.
Verification / Alternative check:
Run ypwhich; it should output the NIS server hostname. Running ypwhich -m lists NIS maps and their masters, reinforcing understanding of the toolset.
Why Other Options Are Wrong:
ypbind: daemon that binds the client to a server; not a query tool.ypcat: prints map contents; does not show the bound server.yppoll: checks map order/master for a given map; not the general “who am I bound to” tool.
Common Pitfalls:
Final Answer:
ypwhich
Discussion & Comments