A summary of commonly used Linux Bash shortcut keys (continuously updated~)!
藏色散人
Release: 2021-11-18 15:17:13
forward
2099 people have browsed it
#Get familiar with Bash shortcut keys to improve efficiency
Bash shortcut keys are actually GNU Readline shortcut keys.
GNU Readline Library is a GNU software package that accepts user input. It is the underlying library of most shells including Bash. Even most software under OSX/Windows/Linux use shortcut keys compatible with it. So these shortcut keys can support pure keyboard operations to a large extent, especially under Linux/OSX.
Bash is part of the GNU Project and is the default shell provided by most Linux distributions.
The essence of Linux lies in the efficiency of the command line, and the first step in learning the command line is to learn how to quickly enter Bash commands.
Cursor movement
Shortcut key
Description
Ctrl a
Move the cursor to the beginning of the line
##Ctrl e
Move the cursor to the end of the line
Alt b
Move the cursor back one word (the beginning of the word)
Alt f
Move the cursor forward one word (the beginning of the word)
Ctrl f
The cursor moves forward one letter
Ctrl b
The cursor moves back one letter
Ctrl xx
Cursor switching between the current position and the beginning of the line
Cut and paste
Shortcut keys
Description
##Ctrl k
Delete from cursor to end of line
Ctrl u
Delete from the cursor to the beginning of the line
Ctrl w
Delete from the cursor to the beginning of the line Delete a word from the front
Alt d
Delete a word from the cursor backward
Ctrl d
Delete the letter under the cursor
Ctrl h
Delete the letter before the cursor
Alt t
swap(current word, previous word)
##Ctrl t
swap(current letter, previous letter)
Ctrl y
Paste the last deleted text
Case conversion
Shortcut keys
Description
Alt c
Capitalize the current letter and move the cursor to the end of the word
Alt u
Upper case from the cursor to the end of the word
Alt l
Lower case from the cursor to the end of the word
History Command
Shortcut Key
Description
Ctrl r
Search backward for historical commands
Ctrl g
Exit search
Ctrl p
Previous command in history
##Ctrl n
Next command in history
Alt .
Last word of previous command
Terminal commands
Shortcut keys
Description
Ctrl l
Clear screen
Ctrl s
Stop Output (forward search history command in Zsh)
Ctrl q
Continue output
Ctrl c
#Terminate the current command
Ctrl z
Suspend the current command
Ctrl d
End input (generates an EOF)
Write an email with pure keyboard?
Most software (GUI, command line) in most operating systems (OSX, Windows, Linux) use GNU Readline compatible libraries at the bottom level to read user input.
Therefore, Bash shortcut keys are fully capable of writing emails using the keyboard only
:
Moving the cursor within the same line: Ctrl-B,
Ctrl-F
,
Ctrl-A, Ctrl-E, etc. Move the cursor up and down: Ctrl-P, Ctrl-N
.
Cut/Paste: Ctrl-W, Alt-D
, etc.
The above is the detailed content of A summary of commonly used Linux Bash shortcut keys (continuously updated~)!. For more information, please follow other related articles on the PHP Chinese website!
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn