Short Description: Here are some keyboard shortcuts that every Linux user should use. These hotkeys in Linux will improve performance and efficiency when using the command line.
Do you know what makes a user different from a regular user? Mastery of working with keyboard shortcuts.
Okay! This is not the only one, but it is undoubtedly a factor.
Keyboard shortcuts help you be more productive and efficient with whatever tool you use. Just think about it. If someone only uses the mouse to copy all the text instead of Ctrl + A, how do you feel about that?
Linux terminal is no exception. There are certain hotkeys in Linux terminals that every user should know and practice.
Trust us; once you master these hotkeys, you will notice how good you are at using the Linux command line.
13 Linux keyboard shortcuts every user should know
We would like to mention that some of these hotkeys may depend on the shell you are using. Bash is the most popular shell, so the list focuses on Bash. If you want, you can invoke a list of hotkeys in Bash.
Note that we have used capital letters in the keyboard shortcuts, but that does NOT mean that you have to press the shift key using these keyboard shortcuts.
This is a key in Linux, without which you cannot work effectively. It will save you so much time on the Linux command line.
Just start typing a command, file name, directory name, or even command parameters and hit the tab key. It will either automatically complete what you type or show all possible results for you.
If you could only remember one key, that would be it.
2. Ctrl + C
These are the keys you must press to exit a command or process on a terminal. This will immediately stop the running program.
If you want to stop using the foreground program, just press this key combination.
3. Ctrl + Z
This hotkey will send the current program in the background. You can usually achieve this before starting the program using the & parameter, but if you forget to do this, use this keyboard shortcut.
4. Ctrl + D
This keyboard shortcut will take you out of the current terminal. If you are using an SSH connection, it will be closed. If you use the terminal directly, the application will be closed immediately.
Think of it as equivalent to the “exit” command.
5. Ctrl + L
How do I clear the terminal screen? We think using the clear command.
Instead of writing CLEAR, you can simply use Ctrl + L to clear the terminal. Convenient, isn’t it?
6. Ctrl + A
This hotkey will move the cursor to the beginning of the line.
Suppose you have typed a long command or path in the terminal and you want to go to the beginning, it will take a long time using the arrow key to move the cursor. Note that you cannot use the mouse to move the cursor to the beginning of the line.
This is where Ctrl + A comes in handy.
7. Ctrl + E
This hotkey is similar to Ctrl + A. Ctrl + A moves the cursor to the beginning of the line, while Ctrl + E moves the cursor to the end of the line.
8. Ctrl + U
Typed the wrong command? Instead of using backspace to discard the current command, use the Ctrl + U keyboard shortcut in the Linux terminal. This hotkey erases everything from the current cursor position to the beginning of the line.
9. Ctrl + K
This is similar to the Ctrl + U key combination. The only difference is that instead of the beginning of the line, it erases everything from the current cursor position to the end of the line.
10. Ctrl + W
You just learned about deleting text to the beginning and end of a line. But what if you just need to delete one word? Use the keyboard shortcut Ctrl + W.
With the keyboard shortcut Ctrl + W, you can delete the word preceding the cursor position. If the cursor is on the word itself, it will delete all letters from the cursor position to the beginning of the word.
The best way to use it is to move the cursor to the next space after the target word and then use the keyboard shortcut Ctrl + W.
11. Ctrl + Y
This command inserts the deleted text that you saw with the Ctrl + W, Ctrl + U and Ctrl + K keys. It comes in handy if you delete incorrect text or if you need to use the deleted text somewhere else.
12. Ctrl + P
You can use this hotkey to view the previous command. You can press it several times to return to the command history. In many terminals this can be achieved with the PgUp key.
13. Ctrl + N
You can use this hotkey in conjunction with Ctrl + P. Ctrl + N displays the following command. If you are viewing the previous commands with Ctrl + P, you can use Ctrl + N to move forward and backward. Many terminals have this hotkey associated with the PgDn key.
What’s your favorite Linux terminal?
We’ve shared our favorite keyboard shortcuts. What are your favorite Linux keyboard shortcuts? If you have them, why not share them with the others in our comments section?
Please disable your ad blocker or whitelist this site!