Summary of common bash shell shortcuts

Source: Internet
Author: User
Tags clear screen
Bash
Shell has two popular shortcut key styles: emacs-based and VI-based, and can switch between them.

Set-o vi # Switch to VI Style
Set-O Emacs # Switch to the Emacs Style

It is based on Emacs by default, which I like very much. After all, I don't think I can press ESC by hand ^-^

Delete:
CTRL + H-delete a character, which is equivalent to the "<-" Key
CTRL + D-delete a character. If there are no characters in the command line, exit shell.
CTRL + k-delete all characters after the cursor
CTRL + U-delete all the characters before the cursor. You can use this to rewrite the command.
CTRL + w-delete a word

History:
CTRL + R-search history, which is actually found in the. bash_history File

Clear screen:
CTRL + L-clear screen, equivalent to the command clear

Control:
CTRL + C-terminate command

Tab key:
Here "2 t" indicates pressing the tab twice
~ 2 T-list the current user in/etc/passwd
$2 T-list all environment variables

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.