The Cisco router prompt shows only that I am configuring a line: config-line.
How can I make IOS to print exactly which line I am configuring?
This is not possible IOS tells the hierarchy level where you are exactly like
Router(config-interface)#
tells you are configuring an interface but not what interface you are configuring.
To know what you are configuring you need to look at the command in global config that made the router to enter (config-line) mode:
Example1:
Router(config )# line vty 0 4
Router(config-line)# ! commands here will configure the line vty 0 to 4
Example 2:
Router(config )# line vty 5 15
Router(config-line)# ! commands here will configure the line vty 5 to 15
actually switches defaults to have also this range of line vty
On the other hand:
if you just want to know in which line vty you are using to access the device you can use
show users
notice the line vty you are using will have a * character near it on the left.
Hope to help
Giuseppe