[Reprint] Linux Shell shortcut keys

Source: Internet
Author: User

History display command history list

← (Ctrl + p) display the previous command

Hide (Ctrl + n) display the next command

! Num: The num command in the History list.

!! Run the previous command

!? String? Execute the latest command containing string strings

Ctrl + r enter several characters and start to search for the command containing the character up. Continue to press Ctrl + r to search for the previous matched command.

Ctrl + s is similar to Ctrl + r, only forward Retrieval

Alt + <first item in the History List

Alt +> last item in the History List

Ctrl + f move the cursor one character forward, equivalent to->

Ctrl + B move the cursor one character backward, equivalent to <-

Alt + f move a word forward with the cursor

Alt + B Move a word behind the cursor

Ls! $ Execute the ls command and set the parameters of the preceding command

Ctrl + a move to the beginning of the current row

Ctrl + e move to the end of the current row

Esc + B Move to the beginning of the current word

Esc + f move to the end of the current word

Ctrl + l clear screen

Ctrl + u cut all the characters before the cursor in the command line (excluding itself)

Ctrl + k cut all characters (including itself) after the cursor in the command line)

Ctrl + d Delete the character at the cursor

Ctrl + h Delete the character before the cursor

Ctrl + y paste the deleted character

Ctrl + w cut the word before the cursor is located (separated by space, punctuation, etc)

Alt + d cut words after the cursor

Esc + w Delete the characters before the cursor is located to the end of the word (separator: space, punctuation, etc)

Ctrl + t flip the cursor and its previous character location, and move the cursor to the next character

Alt + t exchange the current and previous word locations

Alt + u converts the current word to uppercase

Alt + l convert the current word to lowercase

Alt + c converts the current word into uppercase letters

Ctrl + v Insert special characters, such as Ctrl + v + Tab to add the Tab character key

Esc + t place the cursor and its adjacent words upside down

Ctrl + c Delete the entire row

Ctrl + (x u) press Ctrl and then press x and u to cancel the previous operation.

Ctrl + s suspend the Current shell

Ctrl + q restart the suspended shell

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.