Xterm and other terminals through terminal control characters based on the type of terminal emulation. Commons terminal type are VT100...

Note : Most of these keystrokes come from the readline library, and have nothing to do with the terminal type or terminal emulator used (except that some terminals emulators don't play well with control/meta keys). When using bash (which uses readline), a list of shortcuts it offers is obtained by entering "bind -P" at the command prompt.

XTerm - VT100 Edit

Clearing functionsEdit

Keyboard Commands Function
Ctrl-k clear all characters after the cursor
Ctrl-w clears word before the cursor. a word is set of characters separated by spaces
Ctrl-u Clears all characters before the cursor
Ctrl-l clear screen
Ctrl-d deletes characters to the right of cursor, if no characters, logs out and closes terminal
Delete deletes characters to the right of cursor (this may vary depending on settings)
Ctrl-h or Ctrl-8 or Ctrl-Shift-/ deletes characters to the left or the cursor
Backspace deletes characters to the left or the cursor (this may vary depending on settings)
Ctrl-7 or Ctrl-Shift-- Removes a number? of characters from the end
ALT-Backspace Removes words, not single chars. (same as CTRL+W)

Cursor movementEdit

Keyboard Commands Function
Ctrl-a or Home returns cursor to Home
Ctrl-f moves cursor right (forward)
Ctrl+e or End Moves cursor to the end of the line
Crtl-b movers cursor to the left (backward)

same as down arrow

Ctrl-p same as up arrow


Keyboard Commands Function
Ctrl-m or Ctrl-j carriage return
Ctrl-i same as tab
Ctrl-e Return Terminal Status ?
Ctrl-r Search: Reverse search for previous commands matching the pattern entered
Ctrl-t Switched the character before the cursor with the one under the cursor
Ctrl-y Enters the command executed two lines before, without clearing the line of previous contents
Ctrl-o Executes command without clearing the line
Ctrl-p previous command
Ctrl-a returns cursor to Home
Ctrl-s In effect, locks the screen (Ctrl-q unlocks it). XOFF signal for software flow control.
Ctrl-q Unlocks the screen after a XOFF signal. XON signal for software flow control.
Ctrl-f moves cursor right (forward)
Ctrl-g Bell (beep)
Ctrl-z pauses process and places it in terminal background (resume with command 'fg')
Ctrl-x  ?
Ctrl-c kill process
Ctrl-v displays next typed characters (code?)
Crtl-b movers cursor to the left (backward)
Ctrl-n same a down arrow
Ctrl-/ undo: changes made to a previous command
Ctrl-[ similar to Tab but not the same

See AlsoEdit


From HowTo Wiki, a Wikia wiki.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.