Difference between revisions of "CLI - Hostname"

Line 1: Line 1:
The Hostname is changed in the configuration mode.
+
The Hostname is changed in the configuration mode and you can see the current hostname using the <code>show system hostname</code> command. <br>
 +
If you change the hostname to another, the prompt is changed to the new hostname.
 
<pre>
 
<pre>
 +
LYSH@MyHostName# show system hostname
 +
Hostname                      : MyHostName
 +
 
LYSH@MyHostName# configure
 
LYSH@MyHostName# configure
configure# hostname set -h
+
configure# hostname set NewHostName
usage: hostname set [-h] name
+
LYSH@NewHostName# show system hostname
 +
Hostname                      : NewHostName
  
positional arguments:
 
  name        hostname
 
 
optional arguments:
 
  -h, --help  show this help message and exit
 
</pre>
 
 
Example:
 
<pre>
 
LYSH@MyHostName# configure
 
configure# hostname set MyHostName
 
configure# exit
 
LYSH@MyHostName# show system // The hostname is shown in the "System name"
 
 
</pre>
 
</pre>

Revision as of 15:11, 20 April 2021

The Hostname is changed in the configuration mode and you can see the current hostname using the show system hostname command.
If you change the hostname to another, the prompt is changed to the new hostname.

LYSH@MyHostName# show system hostname
Hostname                      : MyHostName

LYSH@MyHostName# configure
configure# hostname set NewHostName
LYSH@NewHostName# show system hostname
Hostname                      : NewHostName