Wednesday, June 25, 2025
HomeBusinessUseful command line keyboard shortcuts

Useful command line keyboard shortcuts

Date:

Related stories

What Makes Joospin Casino Australia Stand Out

Introduction to Joospin Casino Australia In the rapidly evolving world...

Exploring scr66 Casino Australia’s Bonuses

scr66 Casino Australia is renowned not only for its...

Fast & Easy: Register Legit99 in 3 Steps

Introduction to Legit99 Legit99 is emerging as a trusted and...

Expert Picks: Best Odds in Online Sportsbooks

Understanding the Value of Great Odds In the world of...

PokiesGG Casino Australia Welcome Bonus Guide

Online casinos in Australia have become increasingly popular over...
spot_img

I use these bash keyboard shortcuts every day and they save me plenty of time, so I find them worth sharing. Even if you’re developing on Windows, you can have (similar) experience of the Linux bash using the Cygwin tool.

CTRL + R, then arrow up/down
Search in the history of bash commands. Press CTRL + R, type a couple of letters, and the most recent matching command jumps out of history. Press CTRL + R again, and you get older result matching your search string. Once you find your command, you hit either Enter to execute the command directly from reverse search, or any other key to keep it in the command line and be able to edit it (I usually use ESC or right/left arrow or the End key). I use this all the time to recall my previous mysql and ssh commands, or other ones which are too long to type. You can use any keyword inside the command when searching.

Arrow Up / Down
Load previous / next commands from the bash history.

TAB
Autocomplete for commands or filenames. Type first letter(s) and hit TAB. If there are multiple choices matching your first letters, hit TAB again to see the list of them.

CTRL + Arrow Left / Right
Move the cursor word-after-word in the command line. On Mac OS X: ALT + Arrow Left / Right, or ESC + B and ESC + F.

HOME or CTRL + A
Move cursor to the beginning of the line. Only CTRL + A on Mac OS.

END or CTRL + E
Move cursor to the end of the line. Only CTRL + E on Mac OS.

CTRL + K
Delete everything after the cursor (right to the cursor).

CTRL + U
Delete everything before the cursor (left from the cursor).

CTRL + W
Delete only 1 word immediately before the cursor.

CTRL + Y
Undo a deletion, sometimes useful.

CTRL + L
Clear screen, works like the “clear” command.

CTRL + C
Kill the current process.

CTRL + D
Pressed on an empty line: log out from the current terminal. Works pretty much the same as the “exit” command.

Do you have any other favorites which are not mentioned here? Feel free to share them in the comments.

Latest stories

spot_img