hostname — Set or Print Name of Current Host System

Synopsis

/usr/bin/hostname [name-of-host] 

Description

Use the hostname command to print the name of the current host, as given before the login prompt. The superuser can set the host name by giving an argument.

Example

The following example uses hostname with no arguments to display the host name.

$ hostname 
castle 
$ 

Attributes

See attributes(5) for descriptions of the following attributes:

Attribute Type Attribute Value
Availability SUNWcsu

See Also

uname(1), attributes(5)

Get Solaris™ 7 Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.