![]() ![]() Also Ctrl+c works, but it has a side effect of changing the exit code of the last command (accessible with $?) to 130. A fearless terminal ninja can use combos to clear the prompt: Ctrl+a, Ctrl+k and Ctrl+e, Ctrl+u both clear the whole line. ![]() There are keyboard shortcuts Ctrl+u to clear towards the beginning of the line and Ctrl+k to clear towards the end of the line. This is especially useful, if clarity is needed in a presentation, or if someone is spying over your shoulder.įor historical reasons, the command prompt clearing is not that easy. With Ctrl+l (lowercase L), the output can be cleared easily without affecting the line with the command. There are situations, where it is beneficial to remove unneeded output from the terminal. Please suggest a memory rule in the comment field below! How to clear terminal output? However, we a have been unable to come up with a memory rule for the Ctrl+a. The moving to the end of a line is easy to remember, because it is “e as in end”. Moving the cursor to the start and the end of the line can be done as follows (respectively): Ctrl+a and Ctrl+e. Moving to the start or the end of the line is often needed, when modifying the command on the prompt. ![]() In such a situation, Alt+b and Alt+f can be used. It may be quicker to move one word at a time instead of one character at a time. In order to move back and forth, use Ctrl+b (b as in backwards) and Ctrl+f (f as in forwards). Instead of using the arrow keys, or even mouse, keyboard shortcuts can be used to move the cursor back and forth the prompt. Let’s start! Moving around the command line Are you convinced that the ninja way is the right way? Good. See this comparison about clearing the terminal: In a lot of cases, the ninja way of keyboard shortcuts is much faster than the “normal” way. Not all Linux users know that a lot of actions can be done from the keyboard without moving away from the alphabetic keys. However, using arrow keys excessively involves lots of unnecessary movement from the alphabetical keys to the arrow keys and can be just as straining as using a mouse. To avoid using the mouse when working in the terminal is a good skill to have when working with Linux. No more! Here are 15 keyboard shortcuts, that make you as fast and agile as a ninja! Since the dawn of time, mankind has struggled with the unnecessary hand movement during IT tasks. Keyboard shortcuts that can be used to speed up working in the terminal Terminal & command line tricks With these keyboard shortcuts, everyone can become a terminal ninja Here are the keyboard shortcuts covered in this article: Action ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |