Line-editing function

You can edit the command line before typing 'Enter' key.

NOTE:

'Ctrl + X' means typing the Ctrl key and X key simultaneously.

Key Description
Enter
Ctrl + m
Ctrl + j
Executes the command line.
If the command name input is not completed, the command complete function such as 'Tab' key is executed.
If the command name input is completed by the command complete function, the command is executed.
Tab Completes the keywords or shows the candidates of the keywords.
Space If the last inputted keyword is an incomplete keyword of the command name, the complete function such as 'Tab' key is executed. Otherwise, a space character is inputted.
?Shows the command help
Up arrow
Ctrl + p
Shows the previous command line in the command history.
Down arrow
Ctrl + n
Shows the next command line in the command history.
Left arrow
Ctrl + b
Moves the cursor backward one character.
Right arrow
Ctrl + f
Moves the cursor forward one character.
Backspace
Del
Ctrl + h
Deletes one character before the cursor.
Ctrl + d Deletes one character after the cursor.
Ctrl + k Deletes all characters after the cursor.
Ctrl + w Deletes all characters before the cursor.
Ctrl + a Moves the cursor to the top of the line.
Ctrl + e Moves the cursor to the end of the line.
Ctrl + u Deletes all characters of the line.
Ctrl + t Exchanges the characters before and after the cursor.
Ctrl + c Stops editing the cursor command line and starts new command line.
Ctrl + r Redraws the current command line.

Example of line-editing

  • Moving the cursor
    When "administrator" is inputted,
  a  d  m  i  n  i  s  t  r  a  t  o  r  [ ]
                                          |
  +---------------------------------------+  Ctrl + a
  |
 [a] d  m  i  n  i  s  t  r  a  t  o  r
  |
  +--+                                       Ctrl + f
     |                    
  a [d] m  i  n  i  s  t  r  a  t  o  r
     |
     +------------------------------------+  Ctrl + e
                                          | 
  a  d  m  i  n  i  s  t  r  a  t  o  r  [ ]
                                          |
                                      +---+  Ctrl + b
                                      |
  a  d  m  i  n  i  s  t  r  a  t  o [r]
  • The deletion range of characters
    When "administrator" is inputted, and the cursor is moved to the position of [s],
                 Ctrl + d
                  +---+
                  |   |
  a  d  m  i  n  i [s] t  r  a  t  o  r
  |              |  |                 |
  +--------------+  +-----------------+
      Ctrl + w           Ctrl + k
  |                                   |
  +-----------------------------------+
                 Ctrl + c
                 Ctrl + w

Return to Top