Home > Operation and Maintenance > Linux Operation and Maintenance > A summary of commonly used Linux Bash shortcut keys (continuously updated~)!

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 keyDescriptionMove the cursor to the beginning of the line##Ctrl eAlt bAlt fCtrl fCtrl bCtrl xxCut and paste
Ctrl a
Move the cursor to the end of the line
Move the cursor back one word (the beginning of the word)
Move the cursor forward one word (the beginning of the word)
The cursor moves forward one letter
The cursor moves back one letter
Cursor switching between the current position and the beginning of the line

Shortcut keys##Ctrl kCtrl uCtrl wAlt dCtrl dCtrl hAlt t##Ctrl tCtrl yCase conversion
Description
Delete from cursor to end of line
Delete from the cursor to the beginning of the line
Delete from the cursor to the beginning of the line Delete a word from the front
Delete a word from the cursor backward
Delete the letter under the cursor
Delete the letter before the cursor
swap(current word, previous word)
swap(current letter, previous letter)
Paste the last deleted text

Shortcut keysDescriptionAlt cAlt uAlt lHistory Command
Capitalize the current letter and move the cursor to the end of the word
Upper case from the cursor to the end of the word
Lower case from the cursor to the end of the word

Shortcut KeyDescriptionCtrl rCtrl gCtrl pNext command in historyLast word of previous command
Search backward for historical commands
Exit search
Previous command in history ##Ctrl n
Alt .
Terminal commands

Shortcut keys

DescriptionCtrl lClear screenStop Output (forward search history command in Zsh) Continue output#Terminate the current commandSuspend the current commandEnd input (generates an EOF) 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.
Ctrl s
Ctrl q
Ctrl c
Ctrl z
Ctrl d
Write an email with pure keyboard?

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!

Related labels:
source:segmentfault.com
Statement of this 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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template