Command-Line Editing Keys
IOS provides a number of keyboard shortcuts that let you edit the line you’re typing. They should be familiar to any user of Unix or Emacs. Table 1-1 lists the command-line editing keys.
Table 1-1. Command-line editing keys
|
Keys |
Commands |
|---|---|
|
Ctrl-a |
Returns the cursor to the beginning of the current line. |
|
Ctrl-b |
Moves the cursor back one character. (Equivalent to the left arrow key.) |
|
Ctrl-d |
Deletes the character to the left of the cursor. |
|
Ctrl-e |
Moves the cursor to the end of the line. |
|
Ctrl-f |
Moves the cursor forward one character. (Equivalent to the right arrow key.) |
|
Ctrl-k |
Deletes all the characters from the current cursor position to the end of the line. |
|
Ctrl-n |
Goes to the next command in the session history. (Equivalent to the down arrow key.) |
|
Ctrl-p |
Goes to the previous command in the session history. (Equivalent to the up arrow key.) |
|
Ctrl-t |
Switches the current character with the character to the left of the cursor. |
|
Ctrl-r |
Redraws or redisplays the current line. |
|
Ctrl-u |
Clears the line. |
|
Ctrl-w |
Deletes the word to the left of the cursor. |
|
Ctrl-x |
Deletes from the cursor position to the beginning of the line. |
|
Ctrl-y |
Pastes the most recently deleted characters to the current cursor position. |
|
Ctrl-z |
Exits the current configuration mode and returns to the previous configuration mode. |
|
Tab |
Tries to finish the current command. (Command completion.) |
|
Up arrow |
Moves back through the history of commands. |
|
Down arrow |
Moves forward ... |
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access