6
<Sysname> system-view
[Sysname] snmp-agent group v3 ?
STRING<1-32> Group name
In this example, the SNMPv3 group name is an argument of the STRING type. It can contain 1 to 32
characters, each of which can be any printable character except the question mark (?), quotation mark
(“), backward slash (\), and the blank space. You can enter a value such as
test-v3
.
Entering incomplete keywords
You can enter a command comprising incomplete keywords that can uniquely identify the complete
command.
In user view, for example, commands starting with an
s
include
startup
saved-configuration
and
system-view
.
•
To enter system view, enter
sy
.
•
To set the configuration file to be used at the next startup, enter
st s
.
You can also press
Tab
to have an incomplete keyword automatically completed.
Configuring command aliases
The command alias function allows you to replace the first keyword of a command with your preferred
keyword. For example, if you configure
show
as the replacement for the
display
keyword, then to execute
the
display xx
command, you can enter the command alias
show xx
.
Note the following guidelines when configuring command aliases:
•
When you enter a command alias, the system displays and saves the command in its original
format instead of its alias. In other words, you can define and use a command alias but the
command is not restored in its alias format.
•
When you define a command alias, the
cmdkey
and
alias
arguments must be in their complete
form.
•
When you enter an incomplete keyword that partially matches both a defined alias and the
keyword of a command and the command alias function is enabled, the alias takes precedence. To
execute the command whose keyword partially matches your input, enter the complete keyword.
When you enter a character string that partially matches multiple aliases, the system gives you
prompts.
•
If you press
Tab
after you enter an alias keyword, the original format of the keyword is displayed.
•
You can replace only the first keyword of a non-undo command instead of the complete command.
You can replace only the second keyword of
undo
commands.
Follow these steps to configure command aliases:
To do…
Use the command…
Remarks
Enter system view
system-view
—
Enable the command alias function
command-alias enable
Required
Disabled by default, which means
you cannot configure command
aliases.
Configure a command alias
command-alias mapping
cmdkey
alias
Required
Not configured by default.