CONTENT
  • CHANGES
Szukaj
counter

#top hostname


hostname - show or set the system's host name
domainname - show or set the system's NIS/YP domain name
dnsdomainname - show the system's DNS domain name
nisdomainname - show or set system's NIS/YP domain name
ypdomainname - show or set the system's NIS/YP domain name

Powiązane:
hostname

SYNOPSIS
hostname [-v] [-a] [--alias] [-d] [--domain] [-f] [--fqdn] [-i] [--ip-address] [--long] [-s] [--short] [-y] [--yp] [--nis] [-n] [--node]
hostname [-v] [-F filename] [--file filename] [hostname]

domainname [-v] [-F filename] [--file filename] [name]

nodename [-v] [-F filename] [--file filename] [name]

hostname [-v] [-h] [--help] [-V] [--version]

dnsdomainname [-v]

nisdomainname [-v]

ypdomainname [-v]


DESCRIPTION



OPTIONS
-a, --alias
Display the alias name of the host (if used).

-d, --domain
Display the name of the DNS domain. Don't use the command domainname to get the DNS domain name because it will show the NIS domain name and not the DNS domain name. Use dnsdomainname instead.

-F, --file filename
Read the host name from the specified file. Comments (lines starting with a '#') are ignored.

-f, --fqdn, --long
Display the FQDN (Fully Qualified Domain Name). A FQDN consists of a short host name and the DNS domain name. Unless you are using bind or NIS for host lookups you can change the FQDN and the DNS domain name (which is part of the FQDN) in the /etc/hosts file.

-h, --help
Print a usage message and exit.

-i, --ip-address
Display the IP address(es) of the host.

-s, --short
Display the short host name. This is the host name cut at the first dot.

-V, --version
Print version information on standard output and exit successfully.

-v, --verbose
Be verbose and tell what's going on.

-y, --yp, --nis
Display the NIS domain name. If a parameter is given (or --file name ) then root can also set a new NIS domain.



EXAMPLES
Wyświetlenie nazwy hosta:
hostname
W rezultacie pojawi się informacja analogiczna do poniższej:
cen05.xen.wbcd.pl

Ustawienie nazwy hosta:
hostname cen05.xen.wbcd.pl
W rezultacie pojawi się informacja analogiczna do poniższej:
hostname: you must be root to change the host name
Z powyższego komunikatu wynika, że zmiana nazwy hosta jest wymaga uprawnień, czyli wymaga podniesienia uprawnień do uprawnień, które posiada użytkownik root (np: poprzez su lub sudo).




Zmodyfikowany ostatnio: 2015/06/08 10:15:53 (9 lat temu), textsize: 3,42 kB, htmlsize: 4,24 kB

Zapraszam do komentowania, zgłaszania sugestii, propozycji, własnych przykładów, ...
Dodaj komentarzKomentarze użytkowników