Linux Hotkeys
🕹️ Cursor Movement
-
Ctrl + A— Move cursor to the beginning of the line. -
Ctrl + E— Move cursor to the end of the line. -
Alt + F— Move cursor forward one word. -
Alt + B— Move cursor backward one word. -
Ctrl + F— Move cursor forward one character. -
Ctrl + B— Move cursor backward one character. -
Ctrl + XX— Toggle between the start of the line and current cursor position.
✂️ Text Editing
-
Ctrl + U— Cut/Delete from cursor to the beginning of the line. -
Ctrl + K— Cut/Delete from cursor to the end of the line. -
Ctrl + W— Cut/Delete the word before the cursor. -
Alt + D— Cut/Delete the word after the cursor. -
Ctrl + D— Delete the character under the cursor (or exit shell if line is empty). -
Ctrl + H— Delete the character before the cursor (same as Backspace). -
Ctrl + Y— Yank (Paste) the last deleted text. -
Alt + T— Swap the current word with the previous one. -
Ctrl + T— Swap the last two characters before the cursor. -
Alt + U— Capitalize from cursor to the end of the word (UPPERCASE). -
Alt + L— Lowercase from cursor to the end of the word (lowercase). -
Alt + C— Capitalize the first letter of the current word. -
Ctrl + _— Undo the last editing command.
📜 Command History
-
Ctrl + R— Reverse Search through command history. -
Ctrl + G— Exit history search mode. -
Ctrl + P— Previous command in history (same as ↑). -
Ctrl + N— Next command in history (same as ↓). -
Alt + .— Insert the last argument of the previous command. -
!!— Execute the very last command again. -
!n— Execute command number n fromhistory. -
!-n— Execute the command that was n steps ago. -
!string— Execute the last command starting with string.
⚙️ Process Control
-
Ctrl + C— Interrupt/Kill the current foreground process (SIGINT). -
Ctrl + Z— Suspend/Pause the process and send it to background (SIGTSTP). Typefgto resume. -
Ctrl + D— Send End-of-File (EOF). Closes the current terminal session. -
Ctrl + S— Freeze terminal output (Stop scroll). -
Ctrl + Q— Unfreeze terminal output (Resume scroll). -
Ctrl + \— Quit the process with a core dump (SIGQUIT).
🖥️ System & UI
-
Ctrl + L— Clear the screen (same asclearcommand). -
Tab— Auto-complete command, file, or path. -
Tab + Tab— List all possible completions. -
Alt + ?— Show all possible completions. -
Alt + *— Insert all possible completions directly into the line.