# Help, autocompletion, monitoring, shortcuts > Various information about the Cisco CLI Published on 2021-09-14 | Updated on 2025-01-12 | Tags: cisco https://xsec.fr/en/networking/cisco-misc/ --- import Callout from '@shared/components/Callout.astro' ## Help The option that displays the available options for a command is `?` ```txt title="Router#" show ? aaa Show AAA values access-lists List access lists arp Arp table cdp CDP information class-map Show QoS Class Map clock Display the system clock controllers Interface controllers status crypto Encryption module debugging State of each debugging option dhcp Dynamic Host Configuration Protocol status dot11 IEEE 802.11 show information file Show filesystem information flash: display information about flash: file system flow Flow information frame-relay Frame-Relay information history Display the session command history hosts IP domain-name, lookup style, nameservers, and host table interfaces Interface status and configuration ip IP information ipv6 IPv6 information license Show license information line TTY line information --More-- ``` Here the `?` shows the possible commands with **show**. - The `--More--` indicates that there are too many commands for the display window. - The `Enter` key scrolls line by line. - The `Space` key scrolls block by block. ## Autocompletion Commands autocomplete with the tab key. Here are some examples: - `sh ` becomes `show` - `int` becomes `interface` You can start typing the command and press TAB as soon as possible. There may be ambiguity. You need to continue typing to specify the command to the system. So it can complete it correctly. ## Filtering results Adding `|` after a command allows you to filter its result: ```txt title="Router#" sh ru | include interface interface GigabitEthernet0/0/0 interface GigabitEthernet0/0/1 interface GigabitEthernet0/0/2 interface Vlan1 ``` Here `include` filters the result to include the word `interface`. ## Abbreviated commands The Cisco CLI supports command abbreviations. Here are some examples: Abbreviation | Full command --- | --- conf t | configure terminal sh ip int b | show interface brief wr | Write memory int g0/0 | interface GigabitEthernet0/0 ## Error reporting The environment indicates where there is an error. Incorrect syntax or wrong mode (do "command"). ```txt title="Router#" sh ip routte ^ % Invalid input detected at '^' marker. ``` ## Keyboard shortcuts Sequence | Description --- | --- CTRL + A | Beginning of line CTRL + E | End of line CTRL + P or | Previous command CTRL + N or | Next command CTRL + F or | Cursor right CTRL + B or | Cursor left CTRL + Z | Return to privileged mode CTRL + C | Interrupt CTRL + SHIFT + 6 / CTRL + SHIFT + ^ | Forced interruption TAB | Complete a command Backspace | Erase a character to the left CTRL + R | Redisplay the line CTRL + U | Erase the line CTRL + W | Erase a word ESC + b | Move back a word ESC + f | Move forward a word ## Some tips The `do` command allows you to execute a privileged mode command in another mode. ```txt title="Switch(config)#" show run ^ % Invalid input detected at '^' marker. Switch(config)#do show run Building configuration... ``` ## Disabling DNS lookups With DNS resolution (enabled by default), a mistyped command can be interpreted, in privileged mode, as an attempt to connect to a remote domain and block the console for some time: ```txt title="Switch#" showe Translating "showe"...domain server (255.255.255.255) ``` To disable DNS resolution: ```txt title="Switch(config)#" no ip domain-lookup ``` ## Disabling announcements Each time you change the state of an interface (up, down, etc...) The device writes a message in the CLI, indicating what has changed. This can be annoying when typing commands. It is possible to disable these announcements: ```txt title="Terminal" %LINK-1-CHANGED: Interface FastEthernet0/1, changed state to up ``` ```txt title="Switch(config)#" no logging console ``` ## Renaming a device ```txt title="Switch(config)#" hostname MY_SWITCH ``` ## Setting an enable password To enter the "enable" mode of the device, it is possible and even recommended to set a password. ```txt title="Switch(config)#" enable secret MY_PASSWORD ``` With the `secret` option, the password is hashed. ## Viewing the general configuration To display information about the global configuration (hostname, services, interfaces, spanning-tree, password, etc.), execute this command: ```txt title="Switch#" show running-config Building configuration... Current configuration : 1080 bytes ! version 15.0 no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption ! hostname Switch ! ! ! ! ! ! spanning-tree mode pvst spanning-tree extend system-id ! interface FastEthernet0/1 ! interface FastEthernet0/2 --More-- ``` ## Viewing VLAN configuration To display information about VLAN configuration: ```txt title="Switch#" Switch#show vlan VLAN Name Status Ports ---- -------------------------------- --------- ------------------------------- 1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4 Fa0/5, Fa0/6, Fa0/7, Fa0/8 Fa0/9, Fa0/10, Fa0/11, Fa0/12 Fa0/13, Fa0/14, Fa0/15, Fa0/16 Fa0/17, Fa0/18, Fa0/19, Fa0/20 Fa0/21, Fa0/22, Fa0/23, Fa0/24 Gig0/1, Gig0/2 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active VLAN Type SAID MTU Parent RingNo BridgeNo Stp BrdgMode Trans1 Trans2 ---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------ 1 enet 100001 1500 - - - - - 0 0 1002 fddi 101002 1500 - - - - - 0 0 1003 tr 101003 1500 - - - - - 0 0 1004 fdnet 101004 1500 - - - ieee - 0 0 1005 trnet 101005 1500 - - - ibm - 0 0 --More-- ``` VLANs 1002, 1003, 1004, 1005 are reserved in the system for token ring. This system being obsolete, these VLANs are not used. Here interfaces F0/1-24 and G0/1-2 belong to VLAN 1. ## Removing/disabling an element The `no` suffix allows you to remove/disable/delete any previously written command or configuration. ```txt title="Router(config-if)#" Router(config-if)#no ip address 192.168.1.1 255.255.255.0 ``` Removes the IP address assigned to the interface. ```txt title="Router(config)#" no router ospf ``` Disables the OSPF protocol (and its configuration) from the router.