For more information about how to edit shell command lines-Linux general technology-Linux programming and kernel, see the following. The command line editing method of ksh is based on the vi editor, while the bash shell is based on the command line editing of the emacs Text Editor (I have never used emacs, so I didn't find it before ).
By the way, let's introduce some command line key combinations in bash. familiarity with these key combinations is very helpful for improving work efficiency. Please refer to my article: bash usage tips.
If you enter it manually, do you have to work hard without credit?
Browse command line keys
Ctrl + F: move one character forward.
Ctrl + B: move one character backward
Alt + F: Move a word forward.
Alt + B: move one word backward.
Ctrl + A: move the cursor to the beginning of the line.
Ctrl + E: move the cursor to the end of the row.
Ctrl + L: clear screen.
Edit command line keys
Backspace: Delete the current character
Ctrl + H: Same as the backspace key.
Ctrl + T: place where the current character and the previous character are exchanged.
Alt + T: the position of the current word and the previous word.
Alt + U: converts the current word to uppercase.
Alt + L: converts the current word to lowercase.
Alt + C: converts the first letter of the current word to uppercase.
Cut and paste text keys on the command line
Ctrl + K: Cut the text to the end of the line.
Ctrl + U: Cut the text to the line header.
Ctrl + W: Remove a word before the cursor.
Alt + D: cut a word behind the cursor
Ctrl + Y: paste the recently cut text.
Alt + Y: Return to the previously cut text and paste it.
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