Bash (Unix shell) keyboard shortcuts 

Bash (Unix shell)  

Zeynel -
6 years ago
- Shortcuts
1
Ctrl + C

Kill current foreground process running in the terminal

2
Ctrl + Z

Suspend the current foreground process running in bash

0
Ctrl + D

Close the bash shell

Advertisement

0
Ctrl + L

Clear the screen

0
Ctrl + S

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

‎−1
Ctrl + Q

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

2
Ctrl + A

Go to the beginning of the line

‎−1
or Home
2
Ctrl + E

Go to the end of the line

1
or End
0
Ctrl + B

Go left one character

1
Alt + F

Go right one word

0
Ctrl + F

Go right one character

0
Ctrl + X then X

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

0
Ctrl + D

Delete the character under the cursor

2
or Del
0
Alt + D

Delete all characters after the cursor on the current line

0
Ctrl + H

Delete the character before the cursor

1
or Backspace
1
Alt + T

Swap the current word with the previous word

0
Ctrl + T

Swap the last two characters before the cursor with each other

0
Ctrl + _

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

0
Esc + T

Swap the last to words before the cursor

0
Ctrl + W

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

0
Ctrl + K

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

0
Ctrl + U

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

0
Ctrl + Y

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

0
Alt + U

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

0
Alt + L

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

0
Alt + C

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

1
Tab

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

0
Ctrl + P

Go to the previous command in the command history

1
or
0
Ctrl + N

Go to the next command in the command history

0
or
0
Alt + R

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

1
Ctrl + R

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

0
Ctrl + O

Run a command you found with Ctrl + R

0
Ctrl + G

Leave history searching mode without running a command


Share this page on:
Is this page helpful?
1 0

Advertisement

Program information

Program name: Bash (Unix shell) Bash (Unix shell) (System tools)

Web page: gnu.org/software/bash

Last update: 1400/5/21 8:15 UTC

How easy to press shortcuts: 86%

More information >>

Shortcut count: 39

Platform detected: Windows or Linux

Similar programs



User operations

Add Bash (Unix shell) to your list of favorites

Advertisement


What is your favorite Bash (Unix shell) hotkey? Do you have any useful tips for it? Let other users know below.


Only registered users can post links.
Checking site status...
 
No comments yet. Ask, or type the first one!

Latest articles