CLI Command Hierarchy
The CLI commands are organized in a hierarchical fashion, with commands that perform a similar function being grouped together under the same level. For example, all commands that display information about the system and the system software are grouped under the
showcommand, and all commands that display information about the routing table are grouped under theshow routecommand. Figure 1 illustrates a portion of theshowcommand hierarchy.
![]()
To execute a command, enter the full command name, starting at the top level of the hierarchy. For example, to display a brief view of the routes in the router table, use the command
show route brief.The hierarchical organization results in commands that have a regular syntax and provides several features that simplify use of the CLI:
- Consistent command names—Commands that provide the same type of function have the same name, regardless of the portion of the software they are operating on. For example, all
showcommands display software information and statistics, and allclearcommands erase various types of system information.- Lists and short descriptions of available commands—Information about available commands is provided at each level of the CLI command hierarchy. If you type a question mark (
?) at any level, you see a list of the available commands along with a short description of each command. This means that if you already are familiar with the JUNOS software or with other routing software, you can use many of the CLI commands without consulting the documentation.- Command completion—Command completion for command names (keywords) and for command options is available at each level of the hierarchy. If you type a partial command name followed immediately by a question mark (with no intervening space), you see a list of commands that match the partial name you typed.