hostname command

Purpose

Sets or displays the name of the current host system.

Syntax

hostname [HostName]

Description

The hostname command sets or displays the name of the current host system.

Note: If the cluster is present on the machine, you cannot change the host name.

Parameters

Parameter name Description
Hostname Sets the primary name of the host.

Examples

  1. To set the host name to rotterdam, type the command as follows:
    hostname rotterdam
Note: If you attempt to change the host name of a partition, which is in use for cluster communication by typing the following command:
hostname abc

The system displays the following error message with return code 78:

The requested operation is not allowed because partition is a member of "test_cluster" cluster.



Last updated: Wed, November 18, 2020