Bash shortcut commands

Source: Internet
Author: User
Bash shortcut commands are stored in Bashshell. Note the following shortcut keys to greatly improve the efficiency of your command line operations. Edit command Ctrl + a: move to the beginning of the command line Ctrl + e: move to the end of the command line Ctrl + f: forward by character (right) Ctrl + B: by pressing the bash shortcut key command in Bash shell, note the following shortcut keys, which will greatly improve your command line operation efficiency. Edit command Ctrl + a: move to the beginning of the command line Ctrl + e: move to the end of the command line Ctrl + f: forward by character (right) Ctrl + B: move by character (left) alt + f: move forward by word (right) Alt + B: move backward by word (left) Ctrl + xx: move Ctrl + u between the beginning of the command line and the cursor: delete from the cursor to Ctrl + k at the beginning of the command line: delete from the cursor to the end of the command line Ctrl + w: delete from the cursor to the beginning of the Alt + d: delete from the cursor to the end Ctrl + d: delete the character Ctrl + h: delete the character Ctrl + y before the cursor: paste to the cursor Alt + c: change the uppercase word Alt + u from the cursor to all uppercase words Alt + l: change from the cursor to all lowercase words Ctrl + t: exchange the cursor and the previous character Alt + t: exchange the cursor and the previous word Alt + Backspace: with Ctrl + w Similarly, there are some differences between separators [thanks to rezilla for correcting] re-execute command Ctrl + r: reverse search command history Ctrl + g: Exit Ctrl + p from history search mode: previous command Ctrl + n in history: the next command in history Alt +.: use the last parameter control command of the previous command Ctrl + l: clear screen Ctrl + o: execute the current command, and select the previous command Ctrl + s: stop the screen output Ctrl + q: allow screen output Ctrl + c: terminate command Ctrl + z: suspend command Bang (!) Command !!: Execute the previous command! Blah: execute the latest commands starting with blah, such! Ls! Blah: p: only print the output, not execute! $: The last parameter of the previous command, which is the same as Alt +! $: P: print the output! $ Content! *: All parameters of the previous command! *: P: print the output! * Content ^ blah: delete the blah ^ foo in the previous command: replace the blah in the previous command with foo ^ blah ^ foo ^: replace all the blags in the previous command with the foo friendly prompt: most of the Bash shortcuts described above are only valid in emacs editing mode. if you configure Bash to vi editing mode, the key that follows vi is bound. Bash uses the emacs editing mode by default. If your Bash is not in emacs editing mode, you can set it through set-o emacs. ^ S, ^ Q, ^ C, and ^ Z are processed by the terminal device and can be set using the stty command.
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.