Common shortcut key combinations in Shell

Source: Internet
Author: User
Tags clear screen

Enter bind-P to view all keyboard bindings.

CTRL-related shortcut keys
CTRL-A is equivalent to the Home Key, used to position the cursor to the beginning of the line
CTRL + B: move the cursor to the left
CTRL + C: Kill the current process
CTRL + D: exit the Current Shell
CTRL-E is equivalent to the end key, that is, moving the cursor to the end of the row
CTRL + F: equivalent to the right arrow, used to move the cursor to the right
CTRL + H: Delete the first character of the cursor, which is the same as the backspace key.
CTRL + J: equivalent to the Enter key
CTRL + K: Clear the content from the cursor to the end of the row
CTRL + L: clear screen, equivalent to clear
CTRL + P is equivalent to the up arrow, that is, displaying the previous command
CTRL + N is equivalent to the down arrow to display the next command
CTRL + R: Search for commands that have been used before. There will be a prompt to search for bash history based on the keyword you entered
CTRL + u: Clear all content from front of the cursor to the beginning of the line
CTRL + W: Remove a word before the cursor
CTRL + T: two characters before the cursor position
CTRL + Y: paste or restore the last Deletion
CTRL + D: Delete the letter where the cursor is located. Note the difference with backspace and CTRL + H. The two are the characters before the cursor is deleted.
CTRL + F: move the cursor right
CTRL + Z: run the current process in the background, use the FG command to restore the process, or use the BG command to run it in the background.

Alt-related shortcuts
Alt + <: Move to first in the history
Alt +>: Move to the last entry in the history
Alt +? : Displays the current auto-complete prompt
Alt + *: indicates that all auto-Incomplete inserts are displayed.
Alt +/: incomplete file name
Alt +.: used to extract the last word in the History command
Alt + B: move the cursor forward
Alt + C: converts the characters at the current cursor to uppercase, and the subsequent characters of the words at the cursor to lowercase.
Alt + D: delete a word
Alt + F: move the cursor backward
Alt + L: used to convert the words where the cursor is located and subsequent characters of the words to lowercase letters.
Alt + N: Search for historical records
Alt + P: Search for historical records
Alt + R: Call the executed command again
Alt + T: swap the characters before and after the cursor and move the cursor backward
Alt + u: used to convert the cursor position of the word where the cursor is located and all subsequent characters into uppercase letters.
Alt + back-space: Used to delete all contents of the row, basically similar to Ctrl-U.

Alt-related shortcuts
ESC + D: delete a word after the cursor
ESC + F: Jump to the right
ESC + B: Jump to the left
ESC + T: swap two words before the cursor

Related Article

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.