List of terminal shortcut keys

Source: Internet
Author: User

---layout:posttitle: "Terminal Shortcuts list" date:2013-06-20---# # Introduction Most system shells use Bash by default. If you are an Emacs user who inadvertently presses C-A in Bash and finds it possible to jump to the beginning of the command line, C-E jumps to the end of the command line, C-p/c-n can pull up the previous/Next history command ...  These are not coincidences. Yes, Bash supports command-line editing, allowing you to use many different keys to control what you enter on the command line. In particular, Bash supports the Vi/emacs command to view and modify what we enter on the command line.  Don't be surprised, the Shell doesn't allow them to take effect at the same time, so you can avoid being in the Vi and Emacs modes at the same time. The Shell uses the Emacs command by default, called Emacs mode. Of course, we can switch the mode freely by the following operation. <code>//bash shell$ set-o VI #切换至 VI mode $ set-o emacs #由 VI mode cut back to emacs mode//zsh$ Bindkey-v #设为 VI mode $ BINDKEY-E # Set to Emacs mode </code> below, we highlight the shortcut keys in Bash Emacs mode. The shortcut keys listed here are different from those in Emacs. # # Edit Command <pre> C for ctrl,c-a means holding down the Ctrl key and pressing a M for modifier keys, generally alt,m-f means holding down the ALT key and pressing F</pre> # # # Move <table&gt ;<tr><td>c-a</td><td> jump to the beginning of the command line </td></tr><tr><td>C-e</td> <td> jump to the command line end </td></tr><tr><td>C-f</td><td> Move one character forward (Chracter) </td ></tr><tr><td>C-b</td><td> Move backward one character </td></tr>&Lt;tr><td>m-f</td><td> moves forward one word (word) </td></tr><tr><td>m-b</td ><td> Move backward one word </td></tr></table>### delete <table><tr><td>C-k</td> <td> Delete all characters from the current cursor position to the end of the command line (including the character of the cursor) </td></tr><tr><td>C-u</td><td> Removes all characters from the current cursor position to the beginning of the command line (excluding the character of the cursor) </td></tr><tr><td>C-w</td><td> a word before deleting the cursor < /td></tr><tr><td>c-d</td><td> Delete the character where the cursor is located &LT;/TD&GT;&LT;/TR&GT;&LT;TR&GT;&LT;TD >C-h</td><td> Delete a character before the cursor, with the Backspace key <td></td></tr><tr><td>m-d</ td><td> Delete cursor position to the end of the word at the cursor </td></tr><tr><td>C-y</td><td> paste the content you just deleted </ Td></tr><tr><td>c-t</td><td> swap the character of the cursor with its preceding character </td></tr><tr> <td>M-t</td><td> swap the word in the cursor with the position of the previous word </td></tr></table>### search <table>< Tr><td>c-p</td><td> Previous command </td></tr><tr><td>C-n</td><td> next command </td> </tr><tr><td>C-r</td><td> Reverse Search command history (press C-g to exit Search) </td></tr><tr> <td>C-s</td><td> (to Zsh) forward Search command history (press C-g to exit search), Bash locks the screen and presses C-Q to unlock the screen </td></tr></ table>### more <table><tr><td>C-m</td><td> equals "enter" </td></tr><tr ><td>C-i</td><td> equivalent to Tab</td></tr><tr><td>c-[</td><td> Equivalent to esc</td></tr><tr><td>c-l</td><td> clear screen </td></tr><tr>< Td>c-c</td><td> Interrupt Command input </td></tr><tr><td>C-d</td><td> exit Shell Toggle multiple tabs in </td></tr><tr><td>shift+→/←</td><td>konsole </td></tr> Switch multiple tabs in <tr><td>ctrl+pagedown/pageup</td><td>gnome Terminal </td></tr></ Table>## more information + [Bash Manual] (https://www.gnu.org/software/bash/manual/bashref.html#Command-Line-Editing) 

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

List of terminal shortcut keys

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.