- Table of Contents
-
- 01-Fundamentals Command Reference
- 00-Preface
- 01-Feature Matrix
- 02-CLI Command
- 03-Controlling Login Users Commands
- 04-File Management Commands
- 05-FTP and TFTP Commands
- 06-Device Management Commands
- 07-Basic System Configuration Commands
- 08-HTTP Commands
- 09-Logging In to the AP Commands
- 10-Command Index
- Related Documents
-
Title | Size | Download |
---|---|---|
02-CLI Command | 53.46 KB |
Table of Contents
l The models listed in this document are not applicable to all regions. Please consult your local sales office for the models applicable to your region.
l Support of the H3C WA series WLAN access points (APs) for commands may vary by AP model. For more information, see Feature Matrix.
l The interface types and the number of interfaces vary by AP model.
CLI Commands
command-alias enable
Syntax
command-alias enable
undo command-alias enable
View
System view
Default Level
2: System level
Parameters
None
Description
Use the command-alias enable command to enable the command alias function.
Use the undo command-alias enable command to disable the command alias function.
By default, the command alias function is disabled, which means you cannot configure command aliases.
Examples
# Enable the command alias function.
<Sysname> system-view
[Sysname] command-alias enable
# Disable the command alias function.
<Sysname> system-view
[Sysname] undo command-alias enable
command-alias mapping
Syntax
command-alias mapping cmdkey alias
undo command-alias mapping cmdkey
View
System view
Default Level
2: System level
Parameters
cmdkey: The complete form of the first keyword of a command for which an alias will be configured.
alias: Specifies the command alias, which cannot be the same with the first keyword of an existing command.
Description
Use the command-alias mapping command to configure command aliases.
Use the undo command-alias mapping command to delete command aliases.
By default, a command has no alias.
Examples
# Configure command aliases by specifying show as the replacement of the display keyword.
<Sysname> system-view
[Sysname] command-alias mapping display show
After the above configuration, the display commands have their aliases. For example, if the original command is display clock, now its alias is show clock and you can input the alias to view the system time and date.
# Delete the command aliases by canceling the replacement of the display keyword.
<Sysname> system-view
[Sysname] undo command-alias mapping display
command-privilege level
Syntax
command-privilege level level view view command
undo command-privilege view view command
View
System view
Default Level
3: Manage level
Parameters
level level: Command level, which ranges from 0 to 3.
view view: Specifies a view. The value shell of the argument view represents user view. The specified view must be the view to which the command provided by the command argument belongs; for the corresponding view, see the "View" section of the specified command.
command: Command to be set in the specified view.
Description
Use the command-privilege command to assign a level for the specified command in the specified view.
Use the undo command-privilege view command to restore the default.
By default, each command in a view has its specified level. For more information, see Basic System Configuration in the Fundamentals Command Reference. Command level falls into four levels: visit, monitor, system, and manage, which are identified by 0 through 3. The administrator can assign a privilege level for a user according to his need. When the user logs on a device, the commands available depend on the user’s privilege. For example, if a user’s privilege is 3 and the command privilege of VTY 0 user interface is 1, and the user logs on the system from VTY 0, he can use all the commands with privilege smaller than three (inclusive).
l Use the default command level or modify the command level under the guidance of professional staff; otherwise, the change of command level may bring inconvenience to your maintenance and operation, or even potential security problem.
l When you configure the command-privilege command, the value of the command argument must be a complete form of the specified command, that is, you must enter all needed keywords and arguments of the command. The argument should be in the value range. For example, the default level of the tftp server-address { get | put | sget } source-filename [ destination-filename ] [ source { interface interface-type interface-number | ip source-ip-address } ] command is 3; after the command-privilege level 0 view shell tftp 1.1.1.1 put a.cfg command is executed, when users with the user privilege level of 0 log in to the device, they can execute the tftp server-address put source-filename command (such as the tftp 192.168.1.26 put syslog.txt command); users with the user privilege level of 0 cannot execute the command with the get, sget or source keyword, and cannot specify the destination-filename argument.
l When you configure the undo command-privilege view command, the value of the command argument can be an abbreviated form of the specified command, that is, you only need to enter the keywords at the beginning of the command. For example, after the undo command-privilege view system ftp command is executed, all commands starting with the keyword ftp (such as ftp server acl, ftp server enable, and ftp timeout) will be restored to the default level; if you have modified the command level of commands ftp server enable and ftp timeout, and you want to restore only the ftp server enable command to its default level, you should use the undo command-privilege view system ftp server command.
l If you modify the command level of a command in a specified view from the default command level to a lower level, remember to modify the command levels of the quit command and the corresponding command that is used to enter this view. For example, the default command level of commands interface and system-view is 2 (system level); if you want to make the interface command available to the users with the user privilege level of 1, you need to execute the following three commands: command-privilege level 1 view shell system-view, command-privilege level 1 view system interface ethernet 1/1, and command-privilege level 1 view system quit, so that the login users with the user privilege level of 1 can enter system view, execute the interface ethernet command, and then return to user view.
Examples
# Set the command level of the system-view command in user view to 3. (By default, users with the user privilege level of 2 or 3 can use the system-view command after login; after the following configuration, only users with the user privilege level of 3 can use this command to enter system view and configure the device. Therefore, the device security is improved.)
[Sysname] command-privilege level 3 view shell system-view
display command-alias
Syntax
display command-alias
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display command-alias command to display defined command aliases and the corresponding commands.
Examples
# Display the defined command aliases and the corresponding commands.
<Sysname> display command-alias
Command alias is enabled
index alias command key
1 show display
display history-command
Syntax
display history-command
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display history-command command to view the valid history commands that have been executed recently.
Currently, the system can display up to 256 history commands.
Related commands: history-command max-size.
Examples
# Display history commands. (The prompt information depends on the current configuration.)
<Sysname> display history-command
system-view
quit
display current-configuration
----------------- HOTKEY -----------------
=Defined hotkeys=
Hotkeys Command
CTRL_G display current-configuration
CTRL_L display ip routing-table
CTRL_O undo debugging all
=Undefined hotkeys=
Hotkeys Command
CTRL_T NULL
CTRL_U NULL
=System hotkeys=
Hotkeys Function
CTRL_A Move the cursor to the beginning of the current line.
CTRL_B Move the cursor one character left.
CTRL_C Stop current command function.
CTRL_D Erase current character.
CTRL_E Move the cursor to the end of the current line.
CTRL_F Move the cursor one character right.
CTRL_H Erase the character left of the cursor.
CTRL_K Kill outgoing connection.
CTRL_N Display the next command from the history buffer.
CTRL_P Display the previous command from the history buffer.
CTRL_R Redisplay the current line.
CTRL_V Paste text from the clipboard.
CTRL_W Delete the word left of the cursor.
CTRL_X Delete all characters up to the cursor.
CTRL_Y Delete all characters after the cursor.
CTRL_Z Return to the User View.
CTRL_] Kill incoming connection or redirect connection.
ESC_B Move the cursor one word back.
ESC_D Delete remainder of word.
ESC_F Move the cursor forward one word.
ESC_N Move the cursor down a line.
ESC_P Move the cursor up a line.
ESC_< Specify the beginning of clipboard.
ESC_> Specify the end of clipboard.
display hotkey
Syntax
display hotkey
View
Any view
Default Level
1: Monitor level
Parameters
None
Description
Use the display hotkey command to display hotkey information.
Examples
# Display hotkey information.
<Sysname> display hotkey
----------------- HOTKEY -----------------
=Defined hotkeys=
Hotkeys Command
CTRL_G display current-configuration
CTRL_L display ip routing-table
CTRL_O undo debugging all
=Undefined hotkeys=
Hotkeys Command
CTRL_T NULL
CTRL_U NULL
=System hotkeys=
Hotkeys Function
CTRL_A Move the cursor to the beginning of the current line.
CTRL_B Move the cursor one character left.
CTRL_C Stop current command function.
CTRL_D Erase current character.
CTRL_E Move the cursor to the end of the current line.
CTRL_F Move the cursor one character right.
CTRL_H Erase the character left of the cursor.
CTRL_K Kill outgoing connection.
CTRL_N Display the next command from the history buffer.
CTRL_P Display the previous command from the history buffer.
CTRL_R Redisplay the current line.
CTRL_V Paste text from the clipboard.
CTRL_W Delete the word left of the cursor.
CTRL_X Delete all characters up to the cursor.
CTRL_Y Delete all characters after the cursor.
CTRL_Z Return to the User View.
CTRL_] Kill incoming connection or redirect connection.
ESC_B Move the cursor one word back.
ESC_D Delete remainder of word.
ESC_F Move the cursor forward one word.
ESC_N Move the cursor down a line.
ESC_P Move the cursor up a line.
ESC_< Specify the beginning of clipboard.
ESC_> Specify the end of clipboard.
hotkey
Syntax
hotkey { CTRL_G | CTRL_L | CTRL_O | CTRL_T | CTRL_U } command
undo hotkey { CTRL_G | CTRL_L | CTRL_O | CTRL_T | CTRL_U }
View
System view
Default Level
2: System level
Parameters
CTRL_G: Assigns the hot key Ctrl+G to a command.
CTRL_L: Assigns the hot key Ctrl+L to a command.
CTRL_O: Assigns the hot key Ctrl+O to a command.
CTRL_T: Assigns the hot key Ctrl+T to a command.
CTRL_U: Assigns the hot key Ctrl+U to a command.
command: The command line associated with the hot key.
Description
Use the hotkey command to assign a hot key to a command line.
Use the undo hotkey command to restore the default.
By default, the system specifies corresponding commands for Ctrl+G, Ctrl+L and Ctrl+O, while the others are null.
l Ctrl+G corresponds to display current-configuration
l Ctrl+L corresponds to display ip routing-table
l Ctrl+O corresponds to undo debugging all
You can customize this scheme as needed however.
Examples
# Assign the hot key Ctrl+T to the display tcp status command.
<Sysname> system-view
[Sysname] hotkey ctrl_t display tcp status
# Display the configuration of hotkeys.
[Sysname] display hotkey
----------------- HOTKEY -----------------
=Defined hotkeys=
Hotkeys Command
CTRL_G display current-configuration
CTRL_L display ip routing-table
CTRL_O undo debugging all
CTRL_T display tcp status
=Undefined hotkeys=
Hotkeys Command
CTRL_U NULL
=System hotkeys=
Hotkeys Function
CTRL_A Move the cursor to the beginning of the current line.
CTRL_B Move the cursor one character left.
CTRL_C Stop current command function.
CTRL_D Erase current character.
CTRL_E Move the cursor to the end of the current line.
CTRL_F Move the cursor one character right.
CTRL_H Erase the character left of the cursor.
CTRL_K Kill outgoing connection.
CTRL_N Display the next command from the history buffer.
CTRL_P Display the previous command from the history buffer.
CTRL_R Redisplay the current line.
CTRL_V Paste text from the clipboard.
CTRL_W Delete the word left of the cursor.
CTRL_X Delete all characters up to the cursor.
CTRL_Y Delete all characters after the cursor.
CTRL_Z Return to the User View.
CTRL_] Kill incoming connection or redirect connection.
ESC_B Move the cursor one word back.
ESC_D Delete remainder of word.
ESC_F Move the cursor forward one word.
ESC_N Move the cursor down a line.
ESC_P Move the cursor up a line.
ESC_< Specify the beginning of clipboard.
ESC_> Specify the end of clipboard.
quit
Syntax
quit
View
Any view
Default Level
0: Visit level (in user view)
2: System level (in other views)
Parameters
None
Description
Use the quit command to exit to a lower-level view. If the current view is user view, the quit command terminates the current connection and quits the system.
Examples
# Switch from Ethernet 1/0/1 interface view to system view, and then to user view.
[Sysname] quit
<Sysname>
return
Syntax
return
View
Any view except user view
Default Level
2: System level
Parameters
None
Description
Use the return command to return to user view from current view (non user view).
You can also use the hot key Ctrl+Z to return to user view from the current view (non user view), which equals execution of the return command.
Related commands: quit.
Examples
# Return to user view from Ethernet 1/0/1 view.
[Sysname-Ethernet1/0/1] return
<Sysname>
screen-length disable
Syntax
screen-length disable
undo screen-length disable
View
User view
Default Level
1: Monitor level
Parameters
None
Description
Use the screen-length disable command to disable the multiple-screen output function of the current user.
Use the undo screen-length disable command to enable the multiple-screen output function of the current user.
By default, a login user uses the settings of the screen-length command. The default settings of the screen-length command are: multiple-screen output is enabled and 24 lines are displayed on the next screen. (For more information about the screen-length command, see Logging In to the AP in the Fundamentals Command Reference.)
This command is applicable to the current user only and when a user re-logs in, the settings restore to the system default.
Examples
# Disable multiple-screen output of the current user.
<Sysname> screen-length disable
system-view
Syntax
system-view
View
User view
Default Level
2: System level
Parameters
None
Description
Use the system-view command to enter system view from the current user view.
Related commands: quit, return.
Examples
# Enter system view from the current user view.
<Sysname> system-view
System View: return to User View with Ctrl+Z.
[Sysname]