Difference between revisions of "CLI - Hostname"

 
(One intermediate revision by the same user not shown)
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
+
LYSH@MyHostName(config)# 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>

Latest revision as of 10:46, 28 January 2022

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
LYSH@MyHostName(config)# hostname set NewHostName
LYSH@NewHostName# show system hostname
Hostname                      : NewHostName