Enabling and disabling CLI interactive command mode

When the CLI interactive command mode is enabled, you must explicitly enter the choice of yes (‘y’) or no (‘n’) for interactive commands. When interactive command mode is disabled, you are not prompted to explicitly enter the choice of yes (‘y’) or no (‘n’) unless you are saving a configuration.

Procedure
  1. Type “session interactive-mode enable” to enable the CLI interactive command mode.
  2. Type “session interactive-mode disable” to disable the CLI interactive command mode.

The syntax is as follows:

session interactive-mode [enable|disable]

The interactive–mode setting is not saved when the switch is rebooted. The interactive mode is enabled on all CLI sessions by default.

The following example shows some commands used with the CLI interactive command mode disabled.

CLI interactive mode when disabled
switch(config)# no password all
Password protection for all will be deleted, continue [y/n]? y

switch(config)# boot system flash secondary
System will be rebooted from secondary image.
Do you want to continue [y/n]? y
Do you want to save current configuration [y/n]? n

To determine if the CLI interactive mode is enabled or disabled, enter the show session command.

CLI interactive mode enabled
switch(config)# show session
show message type   : Enabled
cli interactive mode: Enabled