---
name: "ypwhich"
section: "1"
platform: "openbsd"
package: "man"
version: "8.0-current-20261101"
release: "OpenBSD 8.0-current (2026-11-01)"
platforms: ["linux", "freebsd", "openbsd"]
url: "https://new.carta.tech/ypwhich"
---

# ypwhich(1)

return hostname of YP server or map master

## NAME

**ypwhich** – return hostname of YP server or map master

## SYNOPSIS

**ypwhich** \[**-t**\] \[**-d** *domain*\]\[ \[**-h**\] *host*\]

**ypwhich** \[**-t**\] \[**-d** *domain*\] \[**-h** *host*\] **-m** \[*mname*\]

**ypwhich** **-x**

## DESCRIPTION

**ypwhich** tells which YP server supplies YP services to a client, or which is the master for a map. If invoked without arguments, it gives the YP server for the local machine. If *host* is specified, that machine is queried to find out which YP server it is using.

The options are as follows:

- **-d** *domain*

  Specify a domain other than the default domain.

- **-h** *host*

  Specify which host to query.

- **-m** \[*mname*\]

  Find the master YP server for the named map. The *host* to query, if non-default, must be specified using the **-h** option. *mname* can be a map name or nickname. If *mname* is omitted, **ypwhich** will produce a list of available maps.

- **-t**

  Inhibit translation of map nicknames to their corresponding map names.

- **-x**

  Display the map nickname table.

## SEE ALSO

[domainname(1)](/domainname/1.md), [ypcat(1)](/ypcat/1.md), [ypmatch(1)](/ypmatch/1.md), [yp(8)](/yp/8.md), [ypbind(8)](/ypbind/8.md), [yppoll(8)](/yppoll/8.md), [ypset(8)](/ypset/8.md)

## AUTHORS

Theo de Raadt
