Configuring the Terminal


This chapter provides information about configuring the terminal in the following topics:

Information about the Terminal

Setting the Screen Length for the Console Terminal

Setting the Screen Width for the Console Terminal

Displaying Terminal Settings

Setting the Timeout for Console Connections

Setting the Timeout for SSH and Telnet Connections

Clearing a Line Connection to the Switch

Setting a Timeout for the Current Session

Information about the Terminal

You can configure the terminal type, display, timeout, and other settings for the console terminal.

Defining a Terminal Type

You can use this procedure to define the type of terminal to use for the switch.

BEFORE YOU BEGIN

Before beginning this procedure, you must know or do the following:

You are logged in to a terminal session with the CLI in EXEC mode.

DETAILED STEPS

 
Command
Purpose

Step 1 

terminal terminal-type type

Example:
n1000v# terminal terminal-type vt100
n1000v#

Configures a terminal type for the switch.

Valid types = vt100, xterm, etc.

Default = vt100

Maximum string length = 80 characters

If an unknown terminal type is used for a Telnet or SSH session, then the switch uses the default, vt100.

Setting the Screen Length for the Console Terminal

You can use this procedure to set the number of lines to display on the screen duirng the current console session.

BEFORE YOU BEGIN

Before beginning this procedure, you must know or do the following:

This procedure only applies to the console port. Telnet and SSH sessions set the terminal length automatically.

You are logged in to a terminal session with the CLI in EXEC mode.

DETAILED STEPS

 
Command
Purpose

Step 1 

terminal length number of lines

Example:
n1000v# terminal length 20
n1000v#

Configures the number of lines to display on the screen for the current console session.

Range = 0 to 511 lines

Default = 24 lines

Disable = 0 (scrolls continuously)

Setting the Screen Width for the Console Terminal

You can use this procedure to set the number of characters to display on a screen line during the current console session.

BEFORE YOU BEGIN

Before beginning this procedure, you must know or do the following:

This procedure only applies to the console port. Telnet and SSH sessions set the terminal width automatically.

You are logged in to a terminal session with the CLI in EXEC mode.

DETAILED STEPS

 
Command
Purpose

Step 1 

terminal width number of characters

Example:
n1000v# terminal width 86
n1000v#

Configures the number of characters to display on each line for the current console session.

Range = 24 to 511 characters

Default = 88 characters

Displaying Terminal Settings

You can use this procedure to display the terminal settings for the current session.

BEFORE YOU BEGIN

Before beginning this procedure, you must know or do the following:

You are logged in to a terminal session with the CLI in any command mode.

DETAILED STEPS

 
Command
Purpose

Step 1 

show terminal

Example:
n1000v# show terminal 
TTY: /dev/pts/8 type: "vt100"
Length: 24 lines, Width: 88 columns
Session Timeout: None
n1000v#

Displays the terminal settings for the current session.

Setting the Timeout for Console Connections

You can use this procedure to specify the duration of time, in minutes, that an inactive console session remains open.

BEFORE YOU BEGIN

Before beginning this procedure, you must know or do the following:

You are logged in to a terminal session with the CLI in EXEC mode.

DETAILED STEPS

 
Command
Purpose

Step 1 

config t

Example:
n1000v # config t
n1000v(config)#

Enters the global configuration mode.

Step 2 

line console

Example:
n1000v(config)# line console
n1000v(config-console)#

Enters the Console Configuration mode.

Step 3 

exec-timeout minutes

Example:
n1000v(config-console)# exec-timeout 60
n1000v(config-console)#

Configures the duration of time, in minutes, that an inactive console session remains open. If the session remains inactive longer than this specified time period, then it is automatically closed.

Range = 0 to 525, 600 minutes

Default = 30 minutes

Disable (no timeout) = 0 minutes

If you set the timeout to zero, then the console connection remains alive until you close it.

Setting the Timeout for SSH and Telnet Connections

You can use this procedure to specify the duration of time, in minutes, that an inactive SSH or Telnet session remains open.

BEFORE YOU BEGIN

Before beginning this procedure, you must know or do the following:

You are logged in to a terminal session with the CLI in EXEC mode.

DETAILED STEPS

 
Command
Purpose

Step 1 

config t

Example:
n1000v # config t
n1000v(config)#

Enters the global configuration mode.

Step 2 

line vty

Example:
n1000v(config)# line vty
n1000v(config-line)#

Enters the Virtual Terminal Line Configuration mode.

Step 3 

exec-timeout minutes

Example:
n1000v(config-line)# exec-timeout 60
n1000v(config-line)#

Configures the duration of time, in minutes, that an inactive Telnet or SSH session remains open. If the session remains inactive longer than this specified time period, then it is automatically closed.

Range = 0 to 525, 600 minutes

Default = 30 minutes

Disable (no timeout) = 0 minutes

If you set the timeout to zero, then the line connection remains alive until you close it.

Clearing a Line Connection to the Switch

You can use this procedure to close a specific line connection to the switch.

BEFORE YOU BEGIN

Before beginning this procedure, you must know or do the following:

You are logged in to a terminal session with the CLI in EXEC mode.

DETAILED STEPS

 
Command
Purpose

Step 1 

clear line aux

Example:
n1000v# clear line aux
n1000v #

Closes a line connection.

Setting a Timeout for the Current Session

You can use this procedure to establish a maximum duration of time, in minutes, that the current terminal session can remain open before the switch shuts it down.

BEFORE YOU BEGIN

Before beginning this procedure, you must know or do the following:

You are logged in to a terminal session with the CLI in EXEC mode.

DETAILED STEPS

 
Command
Purpose

Step 1 

terminal session minutes

Example:
n1000v# terminal session 600
n1000v#

Configures the duration of time, in minutes, that the current terminal session can remain open before the switch shuts it down.

Range = 0 to 525, 600 minutes

Disable (no timeout) = 0 minutes

This change is not saved in the configuration file since it only appies to the current session.