: Customize the CLI
Focus
Focus

Customize the CLI

Table of Contents
End-of-Life (EoL)

Customize the CLI

  • Specify how long an administrative session to the management interface (CLI or web interface) can remain idle before logging the administrator out:
    username@hostname#
    set deviceconfig setting management idle-timeout ?
      0        never   <value>  <1-1440>
    If you want to set the CLI timeout value to a value different from the global
    management idle-timeout
    value, use the
    set cli timeout
    command in operational mode.
  • Specify the format for command output:
    username@hostname>
    set cli config-output-format ?
      default   default   json      json   set       set   xml       xml
    For example, in the default setting the config-output-format looks like this:
    username@hostname#
    show deviceconfig system dns-setting servers
    servers { primary 1.2.3.4; secondary 1.2.3.5; }
    Changing the setting to
    set
    results in output that looks like this:
    username@hostname#
    show deviceconfig system dns-setting servers
    set deviceconfig system dns-setting servers primary 1.2.3.4 set deviceconfig system dns-setting servers secondary 1.2.3.5 [edit] [edit]
    Changing the setting to
    xml
    results in output that looks like this:
    username@hostname#
    show deviceconfig system dns-setting servers
    <response status="success" code="19">   <result total-count="1" count="1">     <servers>       <primary>1.2.3.4</primary> <secondary>1.2.3.5</secondary>             </servers>   </result> </response>
  • Switch to scripting mode. In scripting mode, you can copy and paste commands from a text file directly into the CLI. Although you can do this without scripting-mode enabled (up to 20 lines). If you cut-and-paste a block of text into the CLI, examine the output of the lines you pasted. If you see lines that are truncated or generate errors, you may have to re-paste a smaller section of text, or switch to
    scripting-mode
    :
    username@hostname>
    set cli scripting-mode on
    When in scripting-mode, you cannot use Tab to complete commands or use
    ?
    to get help on command syntax. When you are done pasting commands, switch back to regular mode using the
    set cli scripting-mode off
    command.

Recommended For You