The line Command
The
line command specifies which line or group of
lines you want to configure by entering the line configuration mode.
It doesn’t actually do the configuration; it is followed by
other commands that set up the specific properties you want.
Here’s the syntax of the line command:
line [aux | console | tty | vty] starting-line-number ending-line-numberThe possible line types are aux,
console, tty, and
vty. These line types are discussed individually
in this chapter. The following example shows how to use the
line command to configure some properties of the
router’s console
interface:
Router>enableEnter the privileged command mode Router#config terminalEnter configuration mode Router(config)#line console 0Select the console line Router(config-line)#exec-timeout 30 0Set the timeout to 30 minutes Router(config-line)#exitExit the line configuration mode Router(config)#exitExit the configuration mode Router#
If you want to apply
line commands to more than one line, you can
specify the starting and ending numbers of a group of lines. For
example, say you want to apply the command
exec-timeout to TTY lines 5 through 10. Instead of
typing this command five times, you can configure the entire group
with one line command:
Router(config)#line tty 5 10Router(config-line)#exec-timeout 30 0
Absolute and Relative Line Numbering
When you’re typing the
line
command, you give it
“relative” line numbers: the first TTY is
tty0,[2]
the first virtual terminal is vty0, and so on. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access