---
name: "domainname"
section: "8"
platform: "linux"
package: "nis"
version: "3.17.1-3+b1"
release: "Debian 10 (Buster)"
platforms: ["linux"]
url: "https://new.carta.tech/domainname/8"
---

# domainname(8)

set or display name of current domain nisdomainname - set or display name of current NIS(YP) domain ypdomainname - set or display name of current NIS(YP) domain

## NAME

domainname - set or display name of current domain\
 nisdomainname - set or display name of current NIS(YP) domain\
 ypdomainname - set or display name of current NIS(YP) domain

## SYNOPSYS

**domainname** \[ **domain** \]\
 **nisdomainname** \[ **domain** \]\
 **ypdomainname** \[ **domain** \]

## DESCRIPTION

Without  an  argument, **domainname** displays the name of the current NIS domainname of the system. **domainname** uses the [**getdomainname**(2)](/getdomainname/2.md) function for getting the domainname, **nisdomainname** and **ypdomainname** are using [**yp\_get\_default\_domain**(3)](/yp_get_default_domain/3.md).

Only the super-user can set the name of the domain by specifying the new **domain** as an argument. All three programs uses [**setdomainname**(2)](/setdomainname/2.md) for this. Bear in mind, that already running programs may continue to use the old domainname.

## SEE ALSO

[**getdomainname**(2)](/getdomainname/2.md), [**setdomainname**(2)](/setdomainname/2.md), [**yp\_get\_default\_domain**(3)](/yp_get_default_domain/3.md), [**ypbind**(8)](/ypbind/8.md), [**ypcat**(1)](/ypcat/1.md), [**ypmatch**(1)](/ypmatch/1.md), [**ypwhich**(1)](/ypwhich/1.md), [**yppoll**(8)](/yppoll/8.md), [**ypserv**(8)](/ypserv/8.md), **yset**(8)

## AUTHOR

**domainname** is part of the **yp-tools** package, which was written by Thorsten Kukuk \<kukuk@suse.de\>.
