Bash (Unix shell) keyboard shortcuts

Bash (Unix shell)

Zeynel Abidin Öztürk -
5 months ago
- Shortcuts
Ctrl + C

Kill current foreground process running in the terminal

Ctrl + Z

Suspend the current foreground process running in bash

Ctrl + D

Close the bash shell

Ctrl + L

Clear the screen

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

Ctrl + Q

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

Ctrl + A

Go to the beginning of the line

or Home
Ctrl + E

Go to the end of the line

or End
Ctrl + B

Go left one character

Alt + F

Go right one word

Ctrl + F

Go right one character

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

Ctrl + D

Delete the character under the cursor

or Del
Alt + D

Delete all characters after the cursor on the current line

Ctrl + H

Delete the character before the cursor

or ⬅ Backspace
Alt + T

Swap the current word with the previous word

Ctrl + T

Swap the last two characters before the cursor with each other

Ctrl + _

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

Esc + T

Swap the last to words before the cursor

Ctrl + W

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

Ctrl + K

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

Ctrl + U

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

Ctrl + Y

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

Alt + U

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

Alt + L

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

Alt + C

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

⭾ Tab

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

Ctrl + P

Go to the previous command in the command history

or
Ctrl + N

Go to the next command in the command history

or
Alt + R

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

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

Ctrl + O

Run a command you found with Ctrl + R

Ctrl + G

Leave history searching mode without running a command


Share this page on:

Program information

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

Bash is a Unix shell and a command language. First released in 1989, it has been distributed widely as the default login shell for most Linux distributions and Apple's macOS. A version of Bash can also be installed for Windows 10.

Web page: https://www.gnu.org/software/b...

Shortcut count: 39

Similar programs


  1. Fortnite (PC)Fortnite (PC)
    24397    2
  2. PlayerUnknown's BattlegPlayerUnknown's Battleg
    18727    3
  3. Keyboard symbolsKeyboard symbols
    17656    1
  4. SketchUpSketchUp
    17235   
  5. The Sims 4The Sims 4
    13902    2
  6. DiscordDiscord
    13258   
More keyboard shortcuts...

Latest articles

Advertisement

  Subscribe to our mailing list!

Useful technology tips and keyboard shortcuts will appear in your inbox.

Your email is kept private and we don't spam.

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