< Home

auto-execute command

Function

The auto-execute command command configures auto-run commands.

The undo auto-execute command command cancels auto-run commands.

By default, the auto-run function is disabled.

Format

auto-execute command command

undo auto-execute command

Parameters

Parameter Description Value
command Specifies an auto-run command. -

Views

User interface view

Default Level

3: Management level

Usage Guidelines

Usage Scenario

You can run the auto-execute command command to make a device run a command automatically on the corresponding user interface.

You can run the auto-execute command command to enable automatic execution of the Telnet command.

Precautions

  • The auto-execute command command applies to the VTY user interface.

  • When you log in to a device, the device automatically runs the commands that are configured by the auto-execute command command. After command execution, the user's terminal disconnects from the device.

  • Before saving the configuration of the auto-execute command command, ensure that you can log in to the device to cancel the command configuration.

  • If you use the auto-execute command command, you cannot configure the device in the user interface view. Therefore, use this command with caution.

Example

# Configure the telnet 10.110.100.1 command to automatically run after a user logs in to the device using the VTY0 interface.

<HUAWEI> system-view
[HUAWEI] user-interface vty 0
[HUAWEI-ui-vty0] auto-execute command telnet 10.110.100.1
Warning: The system will not be configured through ui-vty0.
Continue? [Y/N]: y
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >