0% found this document useful (0 votes)
75 views10 pages

01-01 How To Use Command Lines

This document discusses how to use command lines on Huawei wireless access points. It covers entering different command views, editing command lines, using tab completion and help features. The common command views are the user view, system view and interface view. Commands can be run in different views to configure system-wide settings or interface-specific settings. Users can quit a view to return to a higher-level view or use ctrl-z to directly return to the user view.

Uploaded by

Lukman Setiawan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
75 views10 pages

01-01 How To Use Command Lines

This document discusses how to use command lines on Huawei wireless access points. It covers entering different command views, editing command lines, using tab completion and help features. The common command views are the user view, system view and interface view. Commands can be run in different views to configure system-wide settings or interface-specific settings. Users can quit a view to return to a higher-level view or use ctrl-z to directly return to the user view.

Uploaded by

Lukman Setiawan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Fit AP

Command Reference 1 How to Use Command Lines

1 How to Use Command Lines

About This Chapter

1.1 Entering Command Views


1.2 Editing Command Lines
1.3 Using Command Line Online Help
1.4 Interpreting Command Line Error Messages
1.5 Using the undo Command Line
1.6 Displaying History Commands
1.7 Using Command Line Shortcut Keys

1.1 Entering Command Views


The device has many functions; therefore various configuration commands and
query commands are provided to facilitate device management and maintenance.
Huawei wireless access point registers commands to different command views
based on the functions of the commands, so users can easily use them. To use a
function, enter the corresponding command view first and then run corresponding
commands.

Common Command Views


Name How To Enter Function

User When a user logs in to the In the user view, you can view
view device, the user enters the user the running status and statistics
view and the following prompt is of the device.
displayed on the screen:
<Huawei>

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 1


Fit AP
Command Reference 1 How to Use Command Lines

Name How To Enter Function

System Run the system-view command In the system view, you can set
view and press Enter in the user view. the system parameters of the
The system view is displayed. device, and enter other function
<Huawei> system-view views from this view.
Enter system view, return user view with
Ctrl+Z.
[Huawei]

Interface Run the interface command and You can configure interface
view specify an interface type and parameters in the interface view.
number to enter an interface The interface parameters include
view. physical attributes, link layer
[Huawei] interface gigabitethernet X/Y/Z protocols, and IP addresses.
[Huawei-GigabitEthernetX/Y/Z]
NOTE
● X/Y/Z indicates the number of an
interface that needs to be
specified. It is in the format of
slot number/sub card number/
interface sequence number.
● The interface GigabitEthernet is
only an example.

NOTE

● The command line prompt Huawei is the default host name (sysname). The prompt
indicates the current view. For example, <> indicates the user view and [] indicates all
other views except user view.
● Some commands can be executed in multiple views, but they have different functions
after being executed in different views. For example, you can run the lldp enable
command in the system view to enable LLDP globally and in the interface view to
enable LLDP on an interface.
● In the system view, you can run the diagnose command to enter the diagnostic view.
Diagnostic commands are used for device fault diagnosis. If you run some commands in
the diagnostic view, the device may run improperly or services may be interrupted.
Contact technical support personnel and use these diagnostic commands with caution.

Quitting Command Views


You can run the quit command to return from the current view to an upper-level
view.
For example, return from the interface view to the system view and run the quit
command to return to the user view.
[Huawei-GigabitEthernet0/0/1] quit
[Huawei]quit
<Huawei>

To return from the interface view directly to the user view, press Ctrl+Z or run the
return command.
# Press Ctrl+Z to return directly to the user view.
[Huawei-GigabitEthernet0/0/1] #Press Ctrl+Z.
<Huawei>

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 2


Fit AP
Command Reference 1 How to Use Command Lines

# Run the return command to return directly to the user view.


[Huawei-GigabitEthernet0/0/1] return
<Huawei>

1.2 Editing Command Lines


Editing Feature
You can edit commands in a CLI that supports multi-line edition. Each command
can contain a maximum of 512 characters. The keywords in the commands are
case insensitive. Whether a command parameter is case sensitive or not depends
on what the parameter is.
Table 1-1 lists keys that are frequently used for command editing.

Table 1-1 Keys for command editing


Key Function

Common key Inserts a character at the current location of the cursor


if the editing buffer is not full, and the cursor moves to
the right. Otherwise, an alarm is generated.

Backspace Deletes the character on the left of the cursor and the
cursor moves to the left. When the cursor reaches the
head of the command, an alarm is generated.

Left cursor key ← or Moves the cursor to the left by the space of a
Ctrl+B character. When the cursor reaches the head of the
command, an alarm is generated.

Right cursor key → or Moves the cursor to the right by the space of a
Ctrl+F character. When the cursor reaches the end of the
command, an alarm is generated.

Operating Techniques
Incomplete Keyword
You can enter incomplete keywords on the device. In the current view, you do not
need to enter complete keywords if the entered characters can match a unique
keyword. This function improves operating efficiency.
For example, to execute the display current-configuration command, you can
enter d cu, di cu, or dis cu, but you cannot enter d c or dis c because they do not
match unique keywords.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 3


Fit AP
Command Reference 1 How to Use Command Lines

NOTE

The maximum length of a command (including the incomplete command) to be entered is


512 characters. If a command in incomplete form is configured, the system saves the
command to the configuration file in its complete form, which may cause the command to
have more than 512 characters. In this case, the command in incomplete form cannot be
restored after the system restarts. Therefore, when you configure a command in incomplete
form, pay attention to the length of the command.

Tab
Enter an incomplete keyword and press Tab to complete the keyword.
● When a unique keyword matches the input, the system replaces the
incomplete input with the unique keyword and displays it in a new line with
the cursor leaving a space behind. For example:
a. Enter an incomplete keyword.
[Huawei] info-

b. Press Tab.
The system replaces the entered keyword and displays it in a new line
with the complete keyword followed by a space.
[Huawei] info-center

● When the input has multiple matches, press Tab repeatedly to display the
keywords beginning with the incomplete input in a circle until the desired
keyword is displayed. In this case, the cursor closely follows the end of the
keyword. For example:
a. Enter an incomplete keyword.
[Huawei] info-center log

b. Press Tab.
The system displays the prefixes of all the matched keywords. In this
example, the prefix is log.
[Huawei] info-center logbuffer
Press Tab to switch from one matched keyword to another. In this case,
the cursor closely follows the end of a word.
[Huawei] info-center logfile
[Huawei] info-center loghost

Stop pressing Tab when the desired keyword is displayed.


● When an incorrect keyword is entered, press Tab and it is displayed in a new
line without being changed. For example:
a. Enter an incorrect keyword.
[Huawei] info-center loglog

b. Press Tab.
[Huawei] info-center loglog

The system displays information in a new line, but the keyword loglog
remains unchanged and there is no space between the cursor and the
keyword, indicating that this keyword does not exist.

1.3 Using Command Line Online Help


When entering command lines, you can enter a question mark (?) at any time to
obtain online help. You can choose to obtain full help or partial help.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 4


Fit AP
Command Reference 1 How to Use Command Lines

Full Help
When entering a command, you can use the full help function to obtain keywords
and parameters for the command. Use any of the following methods to obtain full
help from a command line.
● Enter a question mark (?) in any command view to obtain all the commands
and their simple descriptions. For example:
<Huawei> ?
User view commands:
backup Backup information
cd Change current directory
cls Clear screen
copy Copy from one file to another
debugging <Group>debugging command group
delete Delete a file
...

● Enter some keywords of a command and a question mark (?) separated by a


space. All keywords associated with this command, as well as simple
descriptions, are displayed. For example:
<Huawei> system-view
[Huawei] user-interface vty 0 4
[Huawei-ui-vty0-4] authentication-mode ?
aaa AAA authentication
password Authentication through the password of a user terminal interface
[Huawei-ui-vty0-4] authentication-mode aaa ?
<cr> Please press ENTER to execute command
[Huawei-ui-vty0-4] authentication-mode aaa

– "aaa" and "password" are keywords. "AAA authentication" and


"Authentication through the password of a user terminal interface"
describe the keywords respectively.
– <cr> indicates that there is no keyword or parameter in this position. You
can press Enter to run this command.
● Enter some keywords of a command and a question mark (?) separated by a
space. All parameters associated with this keyword, as well as simple
descriptions, are listed. For example:
<Huawei> system-view
[Huawei] ftp timeout ?
INTEGER<1-35791> The value of FTP timeout (in minute)
[Huawei] ftp timeout 35 ?
<cr> Please press ENTER to execute command
[Huawei] ftp timeout 35

"INTEGER<1-35791>" describes the value range of the parameter. "The value


of FTP timeout (in minutes)" briefly describes the function of this parameter.

Partial Help
If you enter only the first or first several characters of a command keyword, partial
help provides keywords that begin with this character or character string. Use any
of the following methods to obtain partial help from a command line.
● Enter a character string followed directly by a question mark (?) to display all
keywords that begin with this character string. For example:
<Huawei> d?
debugging <Group> debugging command group
delete Delete a file
dir List files on a filesystem
display Display information
<Huawei>d

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 5


Fit AP
Command Reference 1 How to Use Command Lines

● Enter a command and a string followed directly by a question mark (?) to


display all the keywords that begin with this string. For example:
<Huawei> display e?
elabel Display manufacture information
esn The machine ESN
<Huawei> display e
● Enter the first several letters of a keyword in a command and press Tab to
display a complete keyword. The first several letters, however, must uniquely
identify the keyword. If they do not identify a specific keyword, press Tab
continuously to display different keywords and you can select one as required.

NOTE

The command output obtained through the online help function is used for reference only.

1.4 Interpreting Command Line Error Messages


Table 1-2 lists the common error messages.

Table 1-2 Common error messages of the command line


Error Message Cause of the Error

Error: Unrecognized command No command is found.


found at '^' position.
No keyword is found.

Error: Wrong parameter found at The parameter type is incorrect.


'^' position.
The parameter value exceeds the limit.

Error: Incomplete command The entered command is incomplete.


found at '^' position.

Error: Too many parameters Too many parameters are entered.


found at '^' position.

Error: Ambiguous command Indefinite command is entered.


found at '^' position.

1.5 Using the undo Command Line


If a command line begins with the keyword undo, it is an undo command line.
The undo command lines restore default settings of parameters, disable functions,
or delete configurations. Almost each configuration command line has a
corresponding undo command.
Some examples of using the undo command are listed as follows:
● The undo command disables a specified function.
The info-center enable command enables the information center function on
the device. For example:
<Huawei> system-view
[Huawei] info-center enable

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 6


Fit AP
Command Reference 1 How to Use Command Lines

Info: Information center is enabled.


[Huawei] undo info-center enable
Info: Information center is disabled.
● The undo command deletes a specified configuration.
The header command configures the header information displayed on
terminals when users log in. For example:
<Huawei> system-view
[Huawei] header login information "Hello,Welcome to Huawei!"
Log out of the terminal and re-log in. A message "Hello, Welcome to
Huawei!" is displayed before authentication. Run the undo header login
command.
Hello,Welcome to Huawei!

Login authentication

Username:huawei
Password:
-----------------------------------------------------------------------------

User last login information:


-----------------------------------------------------------------------------
Access Type: Telnet
IP-Address : 192.168.40.1
Time : 2013-04-07 16:50:02+08:00
-----------------------------------------------------------------------------
<Huawei> system-view
[Huawei] undo header login
Log out of the terminal and re-log in. No message is displayed before
authentication.
Login authentication

Username:huawei
Password:
-----------------------------------------------------------------------------

User last login information:


-----------------------------------------------------------------------------
Access Type: Telnet
IP-Address : 192.168.254.204
Time : 2005-08-19 17:45:30+08:00
-----------------------------------------------------------------------------
<Huawei>

NOTE

The command output provided here is used for reference only. The actual output
information may differ from the preceding information.

1.6 Displaying History Commands


By default, the system saves 10 history commands for each user. Run the history-
command max-size size-value command to reset the number of history
commands that are allowed to be saved in a specified user interface view. The
maximum number is 256.

NOTE

If the value is too large, it may take a long time to obtain a required history command.
Therefore, a large value is not recommended.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 7


Fit AP
Command Reference 1 How to Use Command Lines

Table 1-3 shows operations of history commands.

Table 1-3 Accessing history commands


Action Command or Key Result

Display history display history-command Display history


commands. commands entered by
the current user.

Display the earlier Up arrow key ↑ or Ctrl+P If there is an earlier


history command. history command, the
earlier history command
is displayed. Otherwise,
an alarm is generated.

Display the later Down arrow key ↓ or Ctrl+N If there is a later history
history command. command, the later
history command is
displayed. Otherwise, the
command is cleared and
an alarm is generated.

NOTE

You cannot access history commands using the Up arrow key ↑ in HyperTerminal Windows
9X. The Up arrow key ↑ has a different function in Windows 9X and need to be replaced by
the shortcut key Ctrl+P.

When using history commands, note the following:


● The saved history commands are the same as that those entered by users. For
example, if the user enters an incomplete command, the saved command also
is incomplete.
● If the user runs the same command several times, only the latest command is
saved. If the command is entered in different forms, they are considered as
different commands.
For example, if the display current-configuration command is run several
times, only one history command is saved. If the display current-
configuration command and the dis curr command are used, both of them
are saved.

1.7 Using Command Line Shortcut Keys


There are two types of shortcut keys:
● User-defined shortcut keys: include Ctrl+G, Ctrl+L, Ctrl+O, and Ctrl+U. You can
associate these shortcut keys with any commands. When a shortcut key is
pressed, the system runs the corresponding command.
● System-defined shortcut keys: shortcut keys defined in the system that have
fixed functions. Users cannot define these shortcut keys. Table 1-4 lists the
frequently used system-defined shortcut keys.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 8


Fit AP
Command Reference 1 How to Use Command Lines

NOTE

The terminal in use may affect the functions of the shortcut keys. For example, if the
shortcut keys defined by the terminal conflict with those defined in the system, the shortcut
keys entered by the user are captured by the terminal program and the commands
corresponding to the shortcut keys are not executed.

User-defined Shortcut Keys


When a user frequently uses a command or some commands, the user can use
shortcut keys to define these commands. Only management-level users have the
rights to define shortcut keys. The configurations are as follows:
1. Run the system-view command to enter the system view.
2. Run the hotkey { CTRL_G | CTRL_L | CTRL_O | CTRL_U } command-text
command to configure a shortcut key corresponding to a command.

The system supports four user-defined shortcut keys and the default values are as
follows:
● Ctrl+G: display current-configuration
● Ctrl+L: undo idle-timeout
● Ctrl+O: undo debugging all
● Ctrl+U: Null

NOTE

● When defining shortcut keys, use double quotation marks to define the command if this
command contains several keywords separated by spaces. For example, hotkey ctrl_l
"display tcp status". Do not use double quotation marks to define a command if the
command contains only one keyword.
● Run the display hotkey command to view the status of the defined, undefined, and
system-defined shortcut keys.
● Run the command to restore default values of the configured shortcut keys.
● Shortcut keys are executed in the same way as commands. The system can record
commands in their original formats in the command buffer and logs to help query and
locate the fault.
● The user-defined shortcut keys are available to all users. If a user does not have the
rights to use the command defined by a shortcut key, the system displays an error
message when this shortcut key is executed.

System-defined Shortcut Keys

Table 1-4 System-defined shortcut keys

Key Function

Ctrl+A Moves the cursor to the beginning of the


current line.

Ctrl+B Moves the cursor back one character.

Ctrl+C Stops performing current functions.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 9


Fit AP
Command Reference 1 How to Use Command Lines

Key Function

Ctrl+D Deletes the character where the cursor is


located at.

Ctrl+E Moves the cursor to the end of the last


line.

Ctrl+F Moves the cursor forward one character.

Ctrl+H Deletes the character on the left side of


the cursor.

Ctrl+I Provides the same function as Tab.

Ctrl+J Provides the same function as Enter.

Ctrl+M Provides the same function as Enter.

Ctrl+N Displays the next command in the history


command buffer.

Ctrl+P Displays the previous command in the


history command buffer.

Ctrl+T Provides the same function as a question


mark.

Ctrl+W Deletes a character string on the left side


of the cursor.

Ctrl+X Deletes all the characters on the left side


of the cursor.

Ctrl+Y Deletes all the characters on the right


side of the cursor and the character
where the cursor is located at.

Ctrl+Z Returns to the user view.

Ctrl+] Stops incoming connections or redirects


the connections.

Esc+B Moves the cursor back one word.

Esc+D Deletes one word on the right side of the


cursor.

Esc+F Moves the cursor forward one word.

Issue 08 (2021-02-25) Copyright © Huawei Technologies Co., Ltd. 10

You might also like