Sunday, September 8, 2024
HomeBusinessUseful command line keyboard shortcuts

Useful command line keyboard shortcuts

Date:

Related stories

How to Get Money Back If You Have Been Cheated

Being cheated out of money can be a distressing...

The Top 10 High Stakes Roulette Casinos You Should Know

Roulette, a timeless symbol of elegance and excitement in...

Exploring Lapan Slot: A New Era of Online Casino Gaming

Online casino gaming has seen tremendous evolution over the...

Maximize Your LoL Experience: The Advantages of Boosting Services

League of Legends (LoL) has captivated millions of players...

Crazy Time Stats: Decoding the Numbers Behind the Game

Crazy Time, developed by Evolution Gaming, stands out as...
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
  • Armadatoto
  • samuraitoto
  • medantoto
  • dadu88
  • https://hadland.me.uk/
  • https://glenellynrent.com/
  • https://gypsumboardequipment.com/
  • https://realseller.org/
  • https://hotelcasasanagustin.com/game/
  • https://footy.dk/dir/
  • https://idiomas.be/beer/
  • https://harrysphone.com/upin/
  • https://gyergyoalfalu.ro/tokek/
  • https://vipokno.by/gokil/
  • https://winjospg.com/
  • https://winjos801.com/
  • https://www.logansquarerent.com/
  • https://internationalfintech.com/bamsz/