[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Commands Reference, Volume 2

hostname Command

Purpose

Sets or displays the name of the current host system.

Syntax

/usr/bin/hostname [ HostName ] [ -s ]

Description

The /usr/bin/hostname command displays the name of the current host system. Only users with root user authority can set the host name. The mkdev command and the chdev commands also set the host name permanently. Use the mkdev command when you are defining the TCP/IP instance for the first time.

You can use the System application in Web-based System Manager (wsm) to change system characteristics. You could also use the System Management Interface Tool (SMIT) smit mkhostname fast path to run this command.

Flags

-s Trims any domain information from the printed name.

Parameters

HostName Sets the primary name of the host.

Note: You must have root user authority to use the HostName parameter.

Related Information

The chdev command, mkdev command.

The gethostname subroutine, sethostname subroutine.

For information on installing the Web-based System Manager, see Chapter 2: Installation and System Requirements in AIX 5L Version 5.2 Web-based System Manager Administration Guide.

Naming in AIX 5L Version 5.2 System Management Guide: Communications and Networks.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]