In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is about what Bash shortcuts have. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
ALT shortcut key
ALT+A-the cursor moves to the beginning of the line.
ALT+B-the cursor moves to the beginning of the word.
ALT+C-terminates a running command / process. Same as CTRL+C.
ALT+D-closes the empty terminal (that is, it closes the terminal without input). All characters after the cursor are also deleted.
ALT+F-move to the end of the word where the cursor is located.
ALT+T-exchange * * two words.
ALT+U-converts the letters after the cursor in the word to uppercase.
ALT+L-lowercase the letters after the cursor within the word.
ALT+R-undo changes to commands brought from the history.
As you can see in the output above, I pulled an instruction using a reverse search, changed the letter of that instruction, and used ALT+R to undo the change.
ALT+. (note the period at the end)-use the * word of the previous command.
If you want to do the same for multiple commands, you can use this shortcut to get a single word from the first few instructions. For example, I need to use the ls-r command to output the contents of the directory in reverse order by filename. I also want to use the uname-r command to view my kernel version. In both commands, the same word is-r. This is the need for ALT+.. It's a place. Keyboard shortcuts are easy to use. First run ls-r to output in reverse order by file name, and then use the word-r in other commands, such as uname.
CTRL shortcut key
Hongmeng official Strategic Cooperation to build HarmonyOS Technology Community
CTRL+A-quickly move to the beginning of the line.
Let's assume that you enter a command like this. When you are on line N, you find that there is a typing error in the first character of the line
Have you noticed? I typed gind instead of find in the above command. You can navigate to the * letter by pressing the left arrow key all the time and replace f with g. Or, just use the CTRL+An or HOME key to immediately locate the beginning of the line and replace the misspelled word. This will save you a few seconds.
$gind. -mtime-1-type
CTRL+B-the cursor moves forward one character.
This shortcut allows the cursor to move forward one character, that is, one character in front of the cursor. Alternatively, you can use the left arrow key to move forward one character.
CTRL+C-stops the currently running command.
If a command takes too long to run, or if you run it by mistake, you can force it to stop or exit by using CTRL+C.
CTRL+D-one character after the cursor is deleted.
If your system backspace key doesn't work, you can use CTRL+D to delete a character behind the cursor. This shortcut also allows you to exit the current session, similar to exit.
CTRL+E-move to the end of the line.
When you correct the misspelled word at the beginning of the line, press CTRL+E to quickly move to the end of the line. Or, you can use the END key on your keyboard.
CTRL+F-the cursor moves backward one character.
If you want to move the cursor back one character, press CTRL+F instead of the right arrow key.
CTRL+G-exits the history search mode without running the command.
As you can see in the screenshot above, I did a reverse search, but I executed the command and exited the history search mode.
CTRL+H-removes a character from the optical label, the same as the backspace key.
CTRL+J-same as the ENTER/RETURN key.
Does the enter key work? No problem! CTRL+J or CTRL+M can be used to replace the enter key.
CTRL+K-deletes all characters after the cursor.
You don't have to press the delete key all the time to delete the characters behind the cursor. Just press CTRL+K to delete all characters behind the cursor.
CTRL+L-clear the screen and redisplay the current line.
Don't type clear to clear the screen. Simply press CTRL+M to clear and redisplay the current line.
CTRL+M-same as the CTRL+J or RETURN key.
CTRL+N-displays the next line in the command history.
You can also use the down arrow key.
CTRL+O-run the command you found when you used the reverse search, namely CTRL+R.
CTRL+P-the previous command that displays the history of the command.
You can also use the up arrow keys.
CTRL+R-backward search history (reverse search).
CTRL+S-search history forward.
CTRL+T-swap * * two characters.
This is one of my favorite shortcut keys. Suppose you type sl instead of ls. No problem! This shortcut will swap characters like the screenshot below.
CTRL+U-deletes all characters before the cursor (from the point behind the cursor to the beginning of the line).
This shortcut immediately deletes all the preceding characters.
CTRL+V-displays the next character entered verbatim.
CTRL+W-deletes a word in front of the cursor.
Don't get confused with CTRL+U. CTRL+W does not delete everything in front of the cursor, but only one word.
CTRL+X-lists the possible filename completion of the current word.
CTRL+XX-move to the beginning of the line (and then move back).
CTRL+Y-restores the last item you deleted or cut.
Remember, we deleted the word "- al" with CTRL+W in the 21st command. You can use CTRL+Y to recover immediately.
Did you see that? I did not type "- al". Instead, I pressed CTRL+Y to restore it.
CTRL+Z-stops the current command.
You may know a lot about this shortcut. It terminates the currently running command. You can use fg in the foreground or bg in the background to restore it.
CTRL+ [- is equivalent to the ESC key.
Miscellaneous
!-repeat the last order.
ESC+t-exchange * * two words.
Thank you for reading! This is the end of this article on "what are the Bash shortcuts?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.