Bash (Unix shell)

Correcting text

Swap the last to words before the cursor

Esc + T

All hotkeys for Bash (Unix shell)

Working with processes
Kill current foreground process running in the terminal

Ctrl + C

Working with processes
Suspend the current foreground process running in bash

Ctrl + Z

Deleting text
Delete the character under the cursor

Ctrl + D

Controlling the screen
Clear the screen

Ctrl + L

Controlling the screen
Stop all output to the screen. This can be useful when running commands with very long output, but you don't want to stop the command with Ctrl + C

Ctrl + S

Controlling the screen
Resume output to the screen after stopping it with Ctrl + S

Ctrl + Q

Moving the cursor
Go to the beginning of the line

Ctrl + A

Moving the cursor
Go to the beginning of the line

Home

Moving the cursor
Go to the end of the line

Ctrl + E

Moving the cursor
Go to the end of the line

End

Moving the cursor
Go left one character

Ctrl + B

Moving the cursor
Go right one word

Alt + F

Moving the cursor
Go right one character

Ctrl + F

Moving the cursor
Move between the beginning of the line and the current position of the cursor. This allows you to change something and return to original position

Ctrl + X then X

Deleting text
Delete the character under the cursor

Del

Deleting text
Delete all characters after the cursor on the current line

Alt + D

Deleting text
Delete the character before the cursor

Ctrl + H

Deleting text
Delete the character before the cursor

⬅ Backspace

Correcting text
Swap the current word with the previous word

Alt + T

Correcting text
Swap the last two characters before the cursor with each other

Ctrl + T

Correcting text
Undo your last key press. It can be used multiple times

Ctrl + _

Correcting text
Swap the last to words before the cursor

Esc + T

Cut and paste
Cut the word before the cursor and add it to the clipboard

Ctrl + W

Cut and paste
Cut the part of the line after the cursor and add it to the clipboard

Ctrl + K

Cut and paste
Cut the part of the line before the cursor and add it to the clipboard

Ctrl + U

Cut and paste
Paste the last thing you cut from the clipboard. The y here stands for “yank”

Ctrl + Y

Capitalizing characters
Capitalize every character from the cursor to the end of the current word, converting the characters to upper case

Alt + U

Capitalizing characters
Uncapitalize every character from the cursor to the end of the current word, converting the characters to lower case

Alt + L

Capitalizing characters
Capitalize the character under the cursor. Your cursor will move to the end of the current word.

Alt + C

Tab completion
Automatically complete the file, directory, or command you’re typing

⭾ Tab

Command history
Go to the previous command in the command history

Ctrl + P

Command history
Go to the previous command in the command history

Command history
Go to the next command in the command history

Ctrl + N

Command history
Go to the next command in the command history

Command history
Revert any changes to a command you've called from your history, if you've edited it

Alt + R

Command history
Recall the last command matching the characters you provide. Press this shortcut and start typing to search your bash history for a command

Ctrl + R

Command history
Run a command you found with Ctrl + R

Ctrl + O

Command history
Leave history searching mode without running a command

Ctrl + G

Similar combinations for other applications


Bash (Linux)
Swap Last Two Words Before Cursor
Editing

Esc + T


Putty (Windows)
Swap the last two words before the cursor
16 Shortcuts for Putty (Windows)

Esc + T


PuTTY
Swap the last two words before the cursor
Ctrl key bouund

Esc + T