domainname(1) domainname(1)
NAME
domainname - display, modify, define the domain name
SYNOPSIS
domainname Format 1
domainname domainname Format 2
DESCRIPTION
This command is used to output the name of the NIS domain to which the
local host belongs. The system administrator can use this command dur-
ing a system session to modify the default NIS domain.
The name of the default NIS domain to which the host normally belongs
is entered at installation time in the /etc/default/inet file. If it
does not appear there and is not known after system startup, it can be
set by the system administrator.
The local host must be known in the domain to which it is to be con-
nected, in other words, it must be entered on the master server as an
accessible host.
Format 1
domainname
The name of the domain to which the local host is currently
assigned is output.
Format 2
domainname domainname
changes the domain name during the current session. This only
makes sense if you want to access a different domain temporarily.
This command does not change the value of the DOMAIN variable in
the /etc/default/inet file. If the host is to be assigned per-
manently to the new domain, the domain name must be entered in
the /etc/default/inet file.
EXAMPLES
1) You want to find out the name of the domain to which your local
host currently belongs:
Input:
domainname
Output:
sp4
Your local host belongs to the domain sp4.
Page 1 Reliant UNIX 5.44 Printed 11/98
domainname(1) domainname(1)
2) The system administrator would like to assign the local host tem-
porarily to the domain america and therefore enters:
domainname america
If the host is to be assigned permanently to the new domain, the
command must be entered in the file /etc/default/inet.
FILES
/etc/default/inet
SEE ALSO
inet(4).
Page 2 Reliant UNIX 5.44 Printed 11/98