HOSTNAME ( 1 ) USER COMMANDSHOSTNAME ( 1 )


NAME

hostname - print name of the current host

SYNOPSIS

hostname [ options ]

DESCRIPTION

hostname writes the name of the current host on standard output. Use the Network Control Panel Applet to set the hostname.

OPTIONS

-s
Trims any domain information from the name.

EXIT STATUS

0
Success.
>0
An error occurred.

SEE ALSO

gethostname(2)

IMPLEMENTATION

author
Glenn Fowler <glenn.s.fowler@gmail.com >
author
David Korn <dgkorn@gmail.com>
author
Phong Vo <kpv@research.att.com>
copyright
Copyright © 1986-2010 AT&T Intellectual Property
license
http://www.opensource.org/licenses/cpl1.0.txt