Linux keyboard shortcuts to be much more productive!
Do you know what differentiates a professional user from an ordinary user? Mastery over keyboard shortcuts.
Alright! That’s not the only thing, but it’s definitely a factor.
Linux shortcuts help you be more productive and efficient with whatever tool you use. Just think about it. If someone held the mouse all the way down to copy all the text instead of Ctrl + A, how would you feel about it?
The Linux terminal is no exception. There are certain Linux terminal shortcuts that every user should know and practice.
You can trust! Once you’ve mastered these shortcuts, you’ll notice how good it is using the Linux command line.
14 Linux keyboard shortcuts you need to know
To make your daily life and your production even easier on the Linux system, there are some extremely useful shortcuts that can save time and energy.Here, we list the 14 main ones that, if you master and always use, can have great results, increasing productivity. Check out what they are!
1. Tab (auto-complete)
Just start typing a command, file name, directory name, or even command options and hit the tab key. It will automatically complete what you were typing or show you all possible results.
2. Ctrl + C (interrupts a program)
These are the keys that you must press to exit a command or process in a terminal. This will immediately stop a running program.
If you want to stop using a program running in the foreground, just press this key combination.
3. Ctrl + Z (background)
This shortcut will send a program running in the background. Normally, you can achieve this before running the program using the & option, but if you forgot to do so, use this key combination.
4. Ctrl + D (disconnect)
This Linux shortcut disconnects you from the current terminal. If you’re using an SSH connection, it will be closed. If you’re using a terminal directly, the app will close immediately.
5. Ctrl + L (clear the terminal)
How do you clean your terminal screen? I think using the command of course.
Instead of writing C-L-E-A-R, you can simply use Ctrl + L to clear the terminal. Soooo much better, isn’t it?
6. Ctrl + A (move to the beginning of the line)
This shortcut will move the cursor to the start of the line.
Suppose you typed a long command or path in the terminal and want to go to the beginning of it, using the arrow key to move the cursor will take a long time. Note that you cannot use the mouse to move the cursor to the start of the line.
7. Ctrl + E (move to the end of the line)
This shortcut is slightly opposite to Ctrl + A. Ctrl + A sends the cursor to the start of the line, while Ctrl + E moves the cursor to the end of the line.
8. Ctrl + U (erases line)
Did you type a wrong command? Instead of using backspace to discard the current command, use the Ctrl + U shortcut in the Linux terminal. This shortcut erases everything from the current cursor position to the start of the line.
9. Ctrl + K (erase from cursor onward)
This is similar to the shortcut Ctrl + U. 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 (delete a word)
But what if you only need to delete a single word? Use the Ctrl + W shortcut.
Using the shortcut Ctrl + W, you can delete the word before the cursor position. If the cursor is on a word itself, it will erase all letters from the cursor position to the beginning of the word.
11. Ctrl + Y (tail back)
This will paste the deleted text you saw with the shortcuts Ctrl + W, Ctrl + U and Ctrl + K. It comes handy in case you deleted the wrong text or if you need to use the deleted text elsewhere.
12. Ctrl + P (previous command)
You can use this shortcut on Linux to view the previous command. You can press it repeatedly to continue returning to the command history. In many terminals, the same can be achieved with the PgUp key.
13. Ctrl + N (next command)
You can use this shortcut in conjunction with Ctrl + P. Ctrl + N displays the next command. If you’re viewing previous commands with Ctrl + P, you can use Ctrl + N to navigate back and forth. Many terminals have this shortcut mapped to the PgDn key.
14. Alias command
Did you type a combination of cool commands that you have to repeat over and over again? Use the alias command to create your own shortcut:
Summary tables for Linux shortcuts (by categories)
There are several Linux commands and shortcuts, don’t you think? To facilitate your understanding and application of these shortcuts on a daily basis, we have put together a complete table, by categories, that will help you whenever you need it.
We recommend that you already save this page in your favorites or in an easily accessible folder on your computer.
So, in a few clicks you can remember all the commands and insert them into your routine naturally!
Basic shortcuts
The basic Linux shortcuts are those that need to be “stuck” in your mind and at your fingertips, literally.
After all, it is with them that the basic and ordinary actions will be performed, without you having to think much to do them.
Request online help from the Linux | F1 |
Perform a text search | F2 |
Advance a search result within the F2 | F3 |
Return an excerpt search result within F2 | Shift+F3 |
Refresh a page, just like in Windows | F5 |
Open the Linux spell checker (very useful if you're writing) | F7 |
Select all the text on a page | Ctrl+A |
Make the selected text bold | Ctrl+B |
Leave the text selected in italics | Ctrl+I |
Leave the selected text underlined | Ctrl+U |
Save your file (mainly useful in text editors) | Ctrl+S |
It is necessary to navigate the terminal simply and quickly.
After all, agility and simplicity must be part of the daily work of IT teams that execute their processes on Linux.
An easy way to do this is by combining specific shortcuts, which will enable simple navigation. See:
Switch between Super+Tab apps | or the Alt+Tab |
Lock the screen | Super+L or Ctrl+Alt+L |
Minimize open windows | Super+D or Ctrl+Alt+D |
Close all windows | Ctrl+Q or Ctrl+W. |
Sign out (turn off) | Ctrl+Alt+Del |
To work with processes in Linux, it’s very simple. You just have to know which shortcut works for the action you want to perform.
If you want to interrupt, disconnect, clear, or execute background processes, for example, there are specific commands:
Interrupt a program | Ctrl + C |
Background | Ctrl + Z |
Disconnect | Ctrl + D |
Clear the terminal | Ctrl + L |
Move to the beginning of the line | Ctrl + A |
Move to the end of the line | Ctrl + E |
Delete the line | Ctrl + U |
Delete from the cursor onward | Ctrl + K |
Delete a word | Ctrl + W Paste |
it back | Ctrl + Y |
Previous Command | Ctrl + P |
Next Command | Ctrl + N |
On Linux, you can also switch and manage all open desktops, just like in Windows. In the same way, simply combine commands and execute actions in these areas:
Switch between workspaces | Ctrl + Alt + →↓ ↑ ← (arrows) |
Switch to area From work up | Ctrl + Alt + ↑ (up arrow on the keyboard) |
Switch to the desktop down | Ctrl + Alt + ↓ (down arrow on keyboard) |
Switch to the desktop on the right | Ctrl + Alt + → (right arrow on the keyboard) |
Switch to the desktop at | Ctrl + Alt + ← (left arrow on keyboard) |
Move window to desktop above | Ctrl + Alt + Shift + ↑ (up arrow) |
Move window to the desktop below | Ctrl + Alt + Shift + ↓ (down arrow) |
Move window to the desktop on the left | Ctrl + Alt + Shift + ← (left arrow) |
Move window to the desktop on the right | Ctrl + Alt + Shift + → (right arrow) |
Show all existing and running windows and workspaces | Windows Key + W |
To consult or redo a recent action, which was performed using a command or shortcut on Linux, simply consult your recent command history!
They are all stored in short-term memory and can be accessed and reproduced whenever you need to:
Access the previous command in the command history. | Ctrl+P or ↑ (up arrow) |
Return to command history (see several previous commands) | Press Ctrl+P several times or ↑ (up arrow) |
Access the next command in the command history. | Ctrl+N or ↓ (down arrow) |
Return to command history (advance to query commands in history) | Press repeatedly Ctrl+N or ↓ (down arrow) |
Revert changes to a command that you extracted from your history, if it had been edited. | Alt+R |
-
- Access the Linux system settings menu;
- click on the “keyboard” icon;
- open the “shortcuts” tab; select “custom shortcuts”
- or “custom shortcuts”;
- click the “+” icon next to the word;
- a window will open for you to register your new shortcut;
- enter the name of the shortcut, such as “perform action X” and the command that it includes; select the
- “apply changes” or “save” button;
- Access the Linux system settings menu;
that’s it, your shortcut has been created! Now, you just have to activate it for use by selecting the “activate” option if it is “deactivated”;
- press the key combination that you want the shortcut to be activated, such as alt + 3, for example;
- now everything is ready for use!
Do you notice how easy it is? If you used Windows before and now use Linux, but migrated with certain shortcuts or addictions, you just need to create shortcuts similar to those you were already used to, in a personalized way.
Conclusion
We hope this article helped you learn about and master all the various Linux shortcuts that exist!This simple combination of keys on your keyboard can really increase your productivity and make processes as automatic as possible.