Bash shortcuts)

Source: Internet
Author: User
ArticleDirectory
    • Ctrl key bound
    • Alt key bound
    • More special key bindings
Bash, which is the default shell in Linux contains a whole lot of key bindings which makes it really easy to use. The most commonly used shortcuts are listed below:

Ctrl key bound

CTRL +-Jump to the start of the line

CTRL + B-Move back a char

CTRL + c-Terminate the command

CTRL + d-Delete from under the cursor

CTRL + E-Jump to the end of the line

CTRL + F-Move forward a char

CTRL + k-Delete to EOL

CTRL + L-Clear the screen

CTRL + R-Search the history backwards

CTRL + R-Search the history backwards with multi occurrence

CTRL + u-Delete backward from cursor

CTRL + xx-Move Between EoL and current cursor position

CTRL + x @-Show possible hostname completions

CTRL + z-Suspend/stop the command

Alt key bound

Alt + <-Move to the first line in the history

Alt +>-Move to the last line in the history

Alt +?-Show current Completion list

Alt + *-Insert all possible completions

Alt +/-Attempt to complete filename

Alt +.-Yank last argument to previous command

Alt + B-Move backward

Alt + c-Capitalize the word

Alt + d-Delete word

Alt + F-Move forward

Alt + L-Make word lowercase

Alt + n-Search the history forwards non-incremental

Alt + P-Search the history backwards non-incremental

Alt + R-Recall command

Alt + T-Move words around

Alt + u-Make word uppercase

Alt + backspace-Delete backward from cursor

More special key bindings

here 2 T means press TAB twice. and $ is the bash prompt.

$2 T -display all available commands (common)

$ string 2 T -display all available commands starting with string .

$/2 t-Show entire directory structure including hidden ones.

$2 t-Show only sub-directories inside including hidden ones.

$ * 2 t-Show only sub-directories inside excluding hidden ones.

$ ~ 2 t-Show all present users on system from "/etc/passwd"

$2 t-Show All sys Variables

$ @ 2 t-Show All entries from "/etc/hosts"

$ = 2 t -List output like Ls OrDir

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.