Common shortcut keys for Linux commands

Source: Internet
Author: User

Original article link

  • 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

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.