Master key π Linux π» shortcuts to streamline your workflow and boost command-line efficiency in 2024. From navigation to process management, these shortcuts enhance productivity and make terminal tasks smoother.
Essential Linux Shortcuts for 2024
Terminal Navigation Shortcuts π»
- Ctrl + A β Move cursor to the beginning of the line.
- Ctrl + E β Move cursor to the end of the line.
- Ctrl + U β Cut everything from the cursor to the beginning of the line.
- Ctrl + K β Cut everything from the cursor to the end of the line.
- Ctrl + W β Delete the word before the cursor.
- Alt + B β Move cursor backward by one word.
- Alt + F β Move cursor forward by one word.
- Ctrl + Y β Paste the last cut text.
Command History Shortcuts
- Ctrl + R β Reverse search in command history.
- Ctrl + G β Exit from history searching mode.
- !! β Repeat the last command.
-
!n β Run the command with line number
n
from history. - !string β Run the last command starting with "string."
Process Management Shortcuts
- Ctrl + Z β Suspend the current process.
- Ctrl + C β Kill the current process.
- Ctrl + D β Logout or end the terminal session.
- jobs β List all running jobs in the background.
- fg β Bring a background job to the foreground.
- bg β Resume a suspended job in the background.
File and Directory Management Shortcuts
- Tab β Autocomplete file or directory names.
- Alt + . β Insert the last argument of the previous command.
-
Ctrl + L β Clear the screen (similar to
clear
command). - !! > file.txt β Repeat the last command and redirect output to a file.
Text Editing Shortcuts
- Ctrl + Left/Right Arrow β Move left or right by one word in the line.
- Ctrl + Backspace β Delete the previous word.
- Ctrl + Shift + C β Copy selected text in the terminal.
- Ctrl + Shift + V β Paste text into the terminal.
- Shift + Insert β Paste text (alternative for Ctrl + Shift + V).
Miscellaneous
- Ctrl + S β Freeze the terminal output.
- Ctrl + Q β Resume terminal output after freezing.
- Ctrl + T β Swap the last two characters before the cursor.
- Ctrl + X, Ctrl + E β Open the current command in the default editor for easier editing.
Support if you found this helpfulπ
No Money π π»ββοΈ just Subscribe to me YouTube channel.
Linktree Profile: https://linktr.ee/DevOps_Descent
GitHub: https://github.com/devopsdescent
Top comments (11)
I've been using Linux for 30 years, and I never knew of these shortcuts, although they appear to be same as in emacs. Thanks!
They are emacs keybindings. In bash, they are active when the environment variable
EDITOR=emacs
orFCEDIT=emacs
, orset -o emacs
has been run. There is also a set of vi compatible keybindings, used whenset -o vi
has been run.See "
man bash
" then search for "Readline Key Bindings".Well, I hope these will make help you somewhere π§
Super helpful, earned my YT sub.
Thanks π₯°
Thanks for this! Iβll try freezing the terminal before leaving my desk so no one can show their creativity on it π
Hope it will be fun.π
Todos muy lindos pero ninguno para abrir la terminal?
Los atajos son para quienes saben cΓ³mo usar Linux.π
subscribed, thanks!
Thanks for the support π€