MirOS Manual: hostname(1)

HOSTNAME(1)                  BSD Reference Manual                  HOSTNAME(1)


     hostname - set or print name of current host system


     hostname [-fs] [name-of-host]


     The hostname utility prints the name of the current host. The superuser
     can set the host name by supplying a /etc/myname file. This is used at
     system boot time by netstart(8) to initialise the hostname.

     The options are as follows:

     -f      Returns what the DNS resolver thinks the hostname canonicalises
             to. This is usually the "official host name" of the first line in
             /etc/hosts whose official host name or alias matches the name of
             the current host, but can also be retrieved from DNS.

     -s      Trims off any domain information from the printed name.


     /etc/hosts   The host name database.
     /etc/myname  Configuration file containing the fully qualified host name
                  (FQDN), to be set at system boot time.


     domainname(1), getaddrinfo(3), gethostname(3), sethostname(3), hosts(5),
     myname(5), hostname(7), netstart(8)


     The hostname utility appeared in 4.2BSD. The -f option appeared in
     MirOS #11, inspired by the GNU version of hostname.

MirOS BSD #10-current          October 9, 2016                               1

Generated on 2017-04-03 16:26:17 by $MirOS: src/scripts/roff2htm,v 1.88 2017/01/29 00:51:06 tg Exp $

These manual pages and other documentation are copyrighted by their respective writers; their source is available at our CVSweb, AnonCVS, and other mirrors. The rest is Copyright © 2002–2017 The MirOS Project, Germany.
This product includes material provided by mirabilos.

This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report — diffs preferred.