Name

autocommand — line

Synopsis

autocommand command-string
no autocommand

Configures

Automatic execution of a command upon connection

Default

Disabled

Description

This command forces a specified line command, given by command-string, to be executed automatically when a login session is started. The command string can be any valid command. Use the no form to delete the selected autocommand.

Example

The following code starts PPP automatically after a successful login on line 5:

Router(config)#line tty 5
Router(config-line)#autocommand ppp

Get CISCO IOS in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.