---
name: "ypwhich"
section: "1"
platform: "linux"
package: "yp-tools"
version: "4.2.3-4+b2"
release: "Debian 13 (Trixie)"
platforms: ["linux", "freebsd", "openbsd"]
url: "https://new.carta.tech/ypwhich"
---

# ypwhich(1)

return name of NIS server or map master

## NAME

ypwhich - return name of NIS server or map master

## SYNOPSIS

**ypwhich** \[ **-d** *domain* \] \[ **-V**n \] \[ *hostname* \]\
 **ypwhich** \[ **-d** *domain* \] \[ **-t** \] **-m** \[ *mname* \]\
 **ypwhich** **-x**

## DESCRIPTION

**ypwhich** returns the name of the NIS server that supplies the NIS services to a NIS client, or which is the master for a map. If invoked without arguments, it gives the NIS server for the local machine. If *hostname* is specified, that machine is queried to find out which NIS master it is using.

## OPTIONS

- **-d** *domain*

  Specify a domain other than the default domain.

- **-t**

  This option inhibits map nickname translation.

- **-m** *mname*

  Find the master NIS server for a map. No *hostname* can be specified with the **-m** option. *mname* can be a mapname or nickname for a map. If *mname* is omitted, **ypwhich** will produce a list of available maps.

- **-x**

  Display the map nickname translation table.

- **-Vn**

  Version of [**ypbind**(8)](/ypbind/8.md), V3 is default. Use V2 for NIS clients not supporting IPv6.

## FILES

- **/var/yp/nicknames**

  map nickname translation table.

## SEE ALSO

[**domainname**(8)](/domainname/8.md), [**nicknames**(5)](/nicknames/5.md), [**ypbind**(8)](/ypbind/8.md), [**ypcat**(1)](/ypcat/1.md), [**ypmatch**(1)](/ypmatch/1.md), [**yppoll**(8)](/yppoll/8.md), [**ypserv**(8)](/ypserv/8.md), [**ypset**(8)](/ypset/8.md)

## AUTHOR

**ypwhich** is part of the **yp-tools** package, which was written by Thorsten Kukuk \<kukuk@linux-nis.org\>.
