Courseiva
SystemPrivileged EXEC

show line

Displays line configuration and status information for console, auxiliary, and vty lines, used to verify line settings and monitor user connections.

Definition: show line is a Cisco IOS privileged exec command. Displays line configuration and status information for console, auxiliary, and vty lines, used to verify line settings and monitor user connections.

Overview

The 'show line' command is a fundamental diagnostic tool in Cisco IOS that displays the configuration and operational status of terminal lines, including console, auxiliary (aux), and virtual terminal (vty) lines. This command is essential for network engineers to verify line settings, monitor active user connections, and troubleshoot access issues. In the context of CCNA and CCNP studies, understanding line configuration is critical for managing device access, securing remote connections, and ensuring proper administrative control.

The command provides a wealth of information: line type, baud rate, data bits, stop bits, parity, flow control, and the current state of the line (e.g., ready, idle, active). It also shows the number of active sessions, the user currently connected, and the idle time. This data helps engineers confirm that console settings match terminal emulator configurations, that vty lines are properly configured for SSH or Telnet, and that no unauthorized sessions are active.

When troubleshooting connectivity issues, 'show line' is often the first step to check if a line is in use or has been misconfigured. For example, if a user cannot connect via SSH, the engineer can verify that the vty lines are configured for SSH transport and that there are available lines. Compared to 'show users', which shows only active user sessions, 'show line' provides a more comprehensive view of line configuration and status.

It is also useful for verifying line timeouts and exec-timeout settings, which are crucial for security. The command requires privileged EXEC mode (enable) and does not affect the running configuration. Output can be lengthy, especially on devices with many vty lines, so it is often filtered with 'show line | include' or 'show line vty 0 4'.

Understanding the output fields—such as 'Line', 'Type', 'Tx/Rx', 'Modem', 'Rotary', 'AccO', 'AccI', 'Uses', 'Noise', 'Overruns', 'Int'—is key to effective troubleshooting. For instance, high 'Overruns' or 'Noise' values on a console line may indicate a cabling issue or incorrect baud rate. The command also displays the 'Location' and 'Command' fields, which are used for line configuration.

In summary, 'show line' is a versatile command that every network engineer should master for day-to-day management and troubleshooting of device access.

Syntax·Privileged EXEC
show line

When to Use This Command

  • Check if a vty line is configured for SSH or Telnet access.
  • Verify the number of active sessions and which lines are in use.
  • Troubleshoot login issues by reviewing line timeout and authentication settings.
  • Audit line privilege levels and access-class configurations.

Parameters

ParameterSyntaxDescription
line-number<0-34>Specifies a particular line number to display detailed information for that line. Valid values depend on the platform; typically console is line 0, aux is line 1, and vty lines start at 2. Common mistake: using a line number that does not exist on the device, which results in an error.
summarysummaryDisplays a summary of line status, including line number, type, and whether the line is in use. Useful for a quick overview without detailed configuration. Common mistake: forgetting that 'summary' is a keyword, not a parameter value.

Command Examples

Basic show line output for all lines

show line
   Tty Line Typ     Tx/Rx    A Modem  Roty AccO AccI   Uses   Noise  Overruns   Int
     0    0 CTY          -      -    -      -    -    -       0       0     0/0       -
     1    1 AUX   9600/9600    -    -      -    -    -       0       0     0/0       -
   * 2    2 VTY              -      -    -      -    -    -       1       0     0/0       -
     3    3 VTY              -      -    -      -    -    -       0       0     0/0       -
     4    4 VTY              -      -    -      -    -    -       0       0     0/0       -
     5    5 VTY              -      -    -      -    -    -       0       0     0/0       -

Line(s) not in async mode -or- with no hardware support:
1, 2, 3, 4, 5

Tty: line number; Line: line number; Typ: line type (CTY=console, AUX=auxiliary, VTY=virtual terminal); Tx/Rx: transmit/receive speed; A: active (asterisk indicates current session); Modem: modem control; Roty: rotary group; AccO: output access list; AccI: input access list; Uses: number of sessions used; Noise: noise count; Overruns: overrun errors; Int: interface.

Show line with specific line number

show line 2
   Tty Line Typ     Tx/Rx    A Modem  Roty AccO AccI   Uses   Noise  Overruns   Int
     2    2 VTY              -      -    -      -    -    -       1       0     0/0       -

Line 2, Location: "", Type: "VT100"
Length: 24 lines, Width: 80 columns
Baud rate (TX/RX) is 9600/9600, no parity, 2 stopbits, 8 databits
Status: Ready, Active, No Exit Banner
Capabilities: none
Modem state: Ready
Special Chars: Escape  Shift  Hold  Stop  Start  Disconnect  Activation
                ^^x    none    no    no    no     none        none
Timeouts:    Idle EXEC    Idle Session   Modem Answer  Session   Dispatch
               00:10:00     never          none            not set
              Session Limit   Dispatch Exit
              not set          not set

Modem type is unknown.
Session limit is not set.
Time until activation is not set.

Shows detailed configuration for line 2 (VTY). Status indicates if line is ready and active. Timeouts show idle EXEC timeout (10 minutes) and idle session (never). Special Chars shows escape sequence (^^x). This helps verify line settings like timeout and authentication.

Understanding the Output

The 'show line' command output displays a table with columns: Tty (line number), Line (line number), Typ (line type: CTY for console, AUX for auxiliary, VTY for virtual terminal), Tx/Rx (transmit/receive speed), A (active flag: '*' indicates the line you are currently using), Modem (modem control status), Roty (rotary group), AccO (outgoing access list), AccI (incoming access list), Uses (number of active sessions), Noise (noise count), Overruns (overrun errors), and Int (associated interface). A line with 'Uses' > 0 indicates active connections. The asterisk in the 'A' column marks your own session.

The detailed view for a specific line shows configuration parameters like baud rate, databits, stopbits, parity, status (Ready, Active, etc.), timeout values (Idle EXEC, Idle Session), and special characters. In a real network, you would use this to verify that VTY lines have appropriate timeouts (e.g., exec-timeout 5 0) and that no unauthorized sessions are active. A high 'Noise' or 'Overruns' count may indicate hardware issues.

The 'AccO' and 'AccI' columns show if access-lists are applied to restrict access.

Configuration Scenarios

Verify Console Line Settings After Initial Router Setup

After configuring a new router, you need to ensure the console line settings match your terminal emulator (e.g., 9600 baud, 8 data bits, no parity, 1 stop bit). This scenario verifies those settings and checks for any errors.

Topology

PC (Serial) --- Console Cable --- Router (Console port)

Steps

  1. 1.Step 1: Connect to the router via console and enter privileged EXEC mode: Router> enable
  2. 2.Step 2: Display console line configuration: Router# show line console 0
  3. 3.Step 3: Verify the 'Baud rate' is 9600, 'Data bits' is 8, 'Parity' is none, 'Stop bits' is 1, and 'Flow control' is none.
  4. 4.Step 4: Check the 'Line' state is 'ready' and 'Active' is 'no' (no active session).
  5. 5.Step 5: If settings are incorrect, reconfigure using 'line console 0' and appropriate commands.
Configuration
! Example output of 'show line console 0'
   Tty Line Typ     Tx/Rx    A Modem  Roty AccO AccI   Uses   Noise  Overruns   Int
     0    0 CTY    9600/9600 -    -      -    -    -      0       0     0/0       -

! To reconfigure console line:
Router(config)# line console 0
Router(config-line)# speed 9600
Router(config-line)# databits 8
Router(config-line)# parity none
Router(config-line)# stopbits 1
Router(config-line)# no flowcontrol

Verify: Run 'show line console 0' again and confirm the Tx/Rx speed is 9600/9600 and the line state is 'ready'.

Watch out: A common mistake is setting the baud rate on the router but forgetting to match it in the terminal emulator, causing garbled output or no connection.

Troubleshoot SSH Access Issues on VTY Lines

Users report they cannot SSH into the router. You need to verify that vty lines are configured for SSH, that there are enough lines available, and that no lines are stuck in use.

Topology

Admin PC (192.168.1.100) --- Network --- Router (192.168.1.1) (VTY lines 0-4)

Steps

  1. 1.Step 1: Enter privileged EXEC mode: Router> enable
  2. 2.Step 2: Display vty line configuration: Router# show line vty 0 4
  3. 3.Step 3: Check the 'Transport' field for each line; it should show 'SSH' or 'All'.
  4. 4.Step 4: Verify that the 'Line' state is 'ready' and 'Active' is 'no' for at least one line.
  5. 5.Step 5: If a line shows 'Active' with a user, check idle time; if excessive, consider clearing the line with 'clear line vty <number>'.
  6. 6.Step 6: Also verify that the 'Exec-timeout' is set appropriately (e.g., 5 0 for 5 minutes).
Configuration
! Example output of 'show line vty 0 4'
   Tty Line Typ     Tx/Rx    A Modem  Roty AccO AccI   Uses   Noise  Overruns   Int
     2    2 VTY    9600/9600 -    -      -    -    -      0       0     0/0       -
     3    3 VTY    9600/9600 -    -      -    -    -      0       0     0/0       -
     4    4 VTY    9600/9600 -    -      -    -    -      0       0     0/0       -
     5    5 VTY    9600/9600 -    -      -    -    -      0       0     0/0       -
     6    6 VTY    9600/9600 -    -      -    -    -      0       0     0/0       -

! To configure vty lines for SSH:
Router(config)# line vty 0 4
Router(config-line)# transport input ssh
Router(config-line)# login local
Router(config-line)# exec-timeout 5 0

Verify: Run 'show line vty 0 4' and confirm transport is SSH and at least one line is 'ready'. Also test SSH from a PC: ssh -l admin 192.168.1.1

Watch out: A common mistake is configuring 'transport input ssh' but forgetting to generate RSA keys or configure AAA, causing SSH to fail even though the line is ready.

Troubleshooting with This Command

When using 'show line' for troubleshooting, the first step is to identify the line type you are interested in: console (CTY), auxiliary (AUX), or virtual terminal (VTY). For console issues, focus on the 'Tx/Rx' field to ensure baud rate matches your terminal emulator. If you see 'noise' or 'overruns' counters incrementing, it indicates a physical layer problem—check the cable, port, or try a lower speed.

For vty lines, the most common issue is that all lines are in use, preventing new connections. The 'Uses' field shows how many times the line has been used, but the 'Active' column (not shown in basic output; use 'show line' without parameters to see active sessions) indicates current usage. If a line shows 'Active' with a user, note the idle time; if it's excessively long, you may need to clear the line.

Another key field is 'Transport'—if it's set to 'none' or 'telnet' when SSH is required, connections will fail. Also check 'Exec-timeout' configuration; if set to 0 0, sessions never time out, which is a security risk. To correlate with other commands, use 'show users' to see active sessions and their line numbers, then 'show line <line>' for details.

If a user is stuck, 'clear line <line>' can force disconnect. For authentication issues, 'show line' does not show AAA configuration; use 'show running-config | section line' to see login methods. In summary, a systematic approach: 1) Identify the line, 2) Check physical parameters (baud, parity), 3) Check transport and login settings, 4) Check for active sessions and idle times, 5) Clear problematic lines if necessary.

Always verify changes with a subsequent 'show line'.

CCNA Exam Tips

1.

Remember that an asterisk (*) in the 'A' column indicates the line you are currently using.

2.

Know that 'show line' can be used to verify the number of VTY lines available (default 5) and which are in use.

3.

Be aware that 'show line console 0' shows console-specific details, and 'show line vty 0 4' shows all VTY lines.

4.

The 'Uses' column counts active sessions; a value of 0 means the line is free.

Common Mistakes

Confusing 'show line' with 'show users' — 'show line' shows line configuration, while 'show users' shows active user sessions.

Forgetting that the console line is line 0 (CTY) and auxiliary is line 1 (AUX).

Assuming that a line with 'Uses' 0 is not configured — it may just be idle.

show line vs show users

The 'show line' and 'show users' commands are often confused because both display information about terminal lines and active connections on a Cisco router. However, 'show line' focuses on the configuration and status of the lines themselves (console, aux, vty), while 'show users' provides details about currently logged-in user sessions, including idle time and remote addresses.

Aspectshow lineshow users
ScopeLine configuration and status (console, aux, vty)Active user sessions on the device
Output FocusLine parameters (speed, parity, flow control) and operational stateUsername, line type, idle time, and remote IP address
Configuration VisibilityShows line configuration details (e.g., exec-timeout, login local)Does not show configuration; only active session details
User IdentificationDoes not display usernames; shows line number and activityDisplays username (if configured) and line number
Idle Time InformationNot providedDisplays idle time since last user input
Typical UseVerify line settings or troubleshoot line-related issues (e.g., no service terminal)Monitor who is logged in and check for idle sessions

Use 'show line' when you need to verify line configuration (e.g., exec-timeout, speed) or check the status of specific lines (e.g., whether a vty line is active).

Use 'show users' when you need to see active user sessions, including usernames, idle times, and remote IP addresses, to monitor access or troubleshoot connectivity issues.

Platform Notes

In IOS-XE (e.g., Catalyst 9000 switches), the 'show line' command syntax and output are largely identical to classic IOS. However, on some IOS-XE platforms, the console line may be referred to as 'console 0' and vty lines may range from 0 to 15 or more. The output format is consistent, but the 'Tx/Rx' field may show '9600/9600' or '115200/115200' depending on configuration.

In NX-OS (Cisco Nexus switches), the equivalent command is 'show line' as well, but the output is different. NX-OS uses 'show line' to display console and vty line status, but the fields are simplified: it shows line number, type, speed, and state. For detailed configuration, use 'show running-config | section line'.

NX-OS also supports 'show users' for active sessions. On Cisco ASA firewalls, the command 'show line' is not available; instead, use 'show ssh sessions' or 'show telnet sessions' for remote access, and 'show console' for console settings. For IOS-XR (Cisco ASR 9000, etc.), the command 'show line' exists but with different output; it displays line configuration and status, but the syntax is similar.

In older IOS versions (12.x), the output may include additional fields like 'Modem' and 'Rotary' that are less relevant today. In 15.x and 16.x, the output is streamlined. Always check the specific platform documentation, as line numbering can vary (e.g., some platforms have multiple console lines).

Related Commands

Practice for the CCNA 200-301

Test your knowledge with practice questions covering all CCNA 200-301 exam domains.

Practice CCNA 200-301 Questions