E Commands

This chapter describes the basic Cisco NX-OS system commands that begin with E.

echo

To display a text string on the terminal, use the echo command.

echo [ text ]

 
Syntax Description

text

(Optional) Text string to display. The text string is alphanumeric, case sensitive, can contain spaces, and has a maximum length of 200 characters. The text string can also contain references to CLI variables.

 
Command Default

Blank line

 
Command Modes

EXEC mode

 
Command History

Release
Modification

4.0(0)N1(1a)

This command was introduced.

 
Usage Guidelines

You can use this command in a command script to display status information or prompts while the script is running.

Examples

This example shows how to display a blank line at the command prompt:

switch# echo
 

This example shows how to display a line of text at the command prompt:

switch# echo Script run at $(TIMESTAMP).
 

 
Related Commands

Command
Description

run-script

Runs command scripts.

show cli variables

Displays the CLI variables.

end

To end the current configuration session and return to EXEC mode, use the end command.

end

 
Syntax Description

This command has no arguments or keywords.

 
Command Default

None

 
Command Modes

Global configuration mode

 
Command History

Release
Modification

4.0(0)N1(1a)

This command was introduced.

 
Usage Guidelines

This command returns you to EXEC mode regardless of which configuration mode you are in. Use this command when you are done configuring the system and you want to return to EXEC mode to perform verification steps.

Examples

This example shows how the end command is used to exit from interface configuration mode and return to EXEC mode. A show command is used to verify the configuration.

switch# configure terminal
switch(config)# interface ethernet 1/1
switch(config-if)# switchport host
switch(config-if)# end
switch# show interface ethernet 1/1
 

 
Related Commands

Command
Description

exit (EXEC)

Terminates the active terminal session by logging off the switch.

exit (global)

Exits from the current configuration mode.

exec-timeout

To configure the inactive session timeout on the console port or the virtual terminal, use the exec-timeout command. To revert to the default, use the no form of this command.

exec-timeout minutes

no exec-timeout

 
Syntax Description

minutes

Number of minutes. The range is from 0 to 525600. A setting of 0 minutes disables the timeout.

 
Command Default

30 minutes.

 
Command Modes

Terminal line configuration mode

 
Command History

Release
Modification

4.0(0)N1(1a)

This command was introduced.

 
Usage Guidelines

You can configure the console port only from a session on the console port.

Examples

This example shows how to configure the inactive session timeout for the console port:

switch# configure terminal
switch(config)# line console
switch(config-console)# exec-timeout 30
 

This example shows how to revert to the default inactive session timeout for the console port:

switch# configure terminal
switch(config)# line console
switch(config-console)# no exec-timeout
 

This example shows how to configure the inactive session timeout for the virtual terminal:

switch# configure terminal
switch(config)# line vty
switch(config-line)# exec-timeout 30
 

This example shows how to revert to the default inactive session timeout for the virtual terminal:

switch# configure terminal
switch(config)# line vty
switch(config-line)# no exec-timeout
 

 
Related Commands

Command
Description

line console

Enters the console terminal configuration mode.

line vty

Enters the virtual terminal configuration mode.

show running-config

Displays the running configuration.

exit (EXEC)

To close an active terminal session by logging off the switch, use the exit command.

exit

 
Syntax Description

This command has no arguments or keywords.

 
Command Default

None

 
Command Modes

EXEC mode

 
Command History

Release
Modification

4.0(0)N1(1a)

This command was introduced.

Examples

This example shows how the exit (global) command is used to move from configuration mode to EXEC mode and the exit (EXEC) command is used to log off (exit the active session):

switch(config)# exit
switch# exit
 

 
Related Commands

Command
Description

end

Ends your configuration session by exiting to EXEC mode.

exit (global)

Exits from the current configuration mode to the next highest configuration mode.

exit (global)

To exit any configuration mode to the next highest mode in the CLI mode hierarchy, use the exit command in any configuration mode.

exit

 
Syntax Description

This command has no arguments or keywords.

 
Command Default

None

 
Command Modes

All configuration modes

 
Command History

Release
Modification

4.0(0)N1(1a)

This command was introduced.

 
Usage Guidelines

Use the exit command in configuration mode to return to EXEC mode. Use the exit command in interface, VLAN, or zone configuration mode to return to configuration mode. At the highest level, EXEC mode, the exit command will exit the EXEC mode and disconnect from the switch (see the description of the exit (EXEC) command for details).

Examples

This example shows how to exit from the interface configuration mode and to return to the configuration mode:

switch(config-if)# exit
switch(config)#
 

 
Related Commands

Command
Description

end

Ends your configuration session by exiting to privileged EXEC mode.

exit (EXEC)

Terminates the active terminal session by logging off the switch.