Learning and using bash shell shortcuts By fenng|It can be reproduced. During reprinting, it must be indicated by a hyperlink.ArticleSource and author information and copyright notice
Web: http://www.dbanotes.net/techmemo/shell_shortcut.html
This articleBASH Shell shortcuts. It is worth learning. Most of the following content is copy, paste, and summary.
"> CTRLKey-related shortcut keys:
CTRL + A-jump to the start of the linectrl + B-Move back a charctrl + C-terminate the command // is the most commonly used? CTRL + D-delete from under the cursorctrl + E-jump to the end of the linectrl + F-move forward a charctrl + k-Delete to eolctrl + L-Clear the screen // clear screen, similar to the clear command Ctrl + R-search the history backwards // query the historical command Ctrl + R-search the history backwards with multi occurrencectrl + U-delete backward from cursor // The password is incorrectly entered use Ctrl + XX-move between EoL and current cursor positionctrl + x @-show possible hostname completions Ctrl + Z-suspend/stop the command to add: CTRL + H-delete the current character Ctrl + w-delete the last entered word
Shortcut Keys related to the Alt key:
It is rarely used at ordinary times. Some are in conflict with remote login tools.
Alt + <-Move to the first line in the historyalt +>-Move to the last line in the historyalt +? -Show current completion listalt + *-insert all possible completionsalt +/-attempt to complete filenamealt +. -Yank last argument to previous commandalt + B-move backwardalt + C-capitalize the wordalt + D-delete wordalt + F-move forwardalt + L-make word lowercasealt + N-search the history forwards non-incrementalalt + P-search the history backwards non-incrementalalt + R-recall commandalt + T-move words aroundalt + U-make word uppercasealt + back-space-delete backward from cursor
// Securecrt is useful if it is not configured.
Other specific key bindings:
Enter bind-P to view all keyboard bindings. I think this series is more practical.
Here "2 t" means press TAB twice $2 T-all available commands (common) // command line completion, I think it is the best use of bash $ (string) 2 T-all available commands starting with (string) $/2 T-entire directory structure including hidden one $. /2 T-only sub dirs inside including hidden one $ * 2 T-only sub dirs inside without hidden one $ ~ 2 T-all present users on system from "/etc/passwd" // first time, very easy to use $2 T-All sys variables // It is very useful when writing shell scripts $ @ 2 T-entries from "/etc/hosts" // The first time I saw $ = 2 t -output like ls or dir // does not seem as convenient as LS: ESC + T-swap two words before the cursor
ManyReadlineLibrary.Another summaryAlso good
Memory is the enemy of all technicians. It is impossible to remember everything at a time. You can use a few Shortcut Keys repeatedly based on your usage habits.
Do you know the useful shortcut keys? ADD?
-- EOF --