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