Linux command line interactive shortcut keys

Source: Internet
Author: User

Reproduced and integrated from HTTP://CODERBEE.NET/INDEX.PHP/LINUX/20130424/41 http://roclinux.cn/?p=864

M stands for ESC 銉

Move cursor
    • Ctrl–a: Move to the beginning of the line
    • Ctrl–e: Move to end of line
    • Ctrl–b: Move backward (left) one character
    • Ctrl–f: Move a character backward (right)
    • Alt–b: Move back (left) one word
    • Alt–f: Move a word backward (right)
    • CTRL–XX: Moves between the end of the command line and the cursor
    • M-b: Move back (left) one word
    • M-f: Move a word backward (right)
Edit command
    • Ctrl–h: Delete the character at the left of the cursor
    • Ctrl–d: Delete the character at the right position of the cursor (note: The current command line does not have any characters when the system or end terminal is logged off)
    • Ctrl–w: Starts with the cursor position and deletes the word to the left. Delete at the beginning of line
    • Alt–d: Starts at the cursor position and deletes the word to the right. Delete at the end of the line
    • M–d: Starts at the cursor position, deleting the word until the word ends.
    • Ctrl–k: Removes all characters from the right until the end of the line, starting at the cursor position.
    • Ctrl–u: Starts with the cursor position, removing all characters from the left until the line starts.
    • Ctrl–y: Pastes the previously deleted content into the cursor.
    • Alt + T: positions at the swap cursor and before two characters.
    • Alt +. : Use the last parameter of the previous command.
    • Ctrl–_: The status before the reply. Undo operation.
    • Alt-backspace is used to remove all of the bank's content, basically similar to ctrl-u.

    • The alt-c is used to capitalize the character at the current cursor and subsequent characters in the word where the cursor is located are lowercase.

    • Alt-l is used to lowercase the word in which the cursor is located and subsequent characters in the word.
    • Alt-u is used to capitalize all characters at and after the cursor at the word where the cursor is located.

Ctrl -a + Ctrl -kor Ctrl -e + Ctrl -u or Ctrl -k + Ctrl -u combine to delete an entire row.

Bang (!) Command
    • !! : Executes the previous command.
    • ^foo^bar: replace Foo in the previous command with bar and execute.
    • !wget: Executes the most recent command that starts with wget.
    • !wget:p: Only the most recent command starting with wget is printed, not executed.
    • !$: The last parameter of the previous command, same as Alt - . and $_ .
    • !*: All parameters of the previous command
    • !*:p: Print the previous command is all parameters, that is, !* the content.
    • ^ABC: Deletes ABC from the previous command.
    • ^foo^bar: replace Foo in the previous command with bar
    • ^foo^bar^: replace Foo in the previous command with bar
    • !-n: Executes the first n command, executes the previous command: !-1 , the first 5 commands are executed in the following format:!-5
Find History command
    • Ctrl–p: Displays the previous history command for the current command
    • Ctrl–n: Displays the next history command for the current command
    • Ctrl–r: Search History Command, as the input displays a match command in the history command, enter executes the match command, and the ESC key is displayed at the command line without executing the matching command.
    • Ctrl–g: Exit from historical search mode (CTRL–R).
Control commands
    • Ctrl–l: Clear the screen, and then, at the top, re-display the contents of the line where the cursor is currently located.
    • Ctrl–o: Executes the current command and selects the previous command.
    • Ctrl–s: Block screen output, that is, lock screen, if set Stty-ixon ctrl-s can be used in conjunction with CTRL-R
    • Ctrl–q: Allow screen output
    • Ctrl–c: Abort command
    • Ctrl–z: Suspend command
Repeat Action action
    • M – Operation Action: Specifies the number of operations and repeats the specified operation.

Ps:bind-p can view all the bound commands.

Linux command line interactive shortcut keys (GO)

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.