Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
October 2, 2022 07:00 am GMT

Cheat Sheet To All Bash Shortcuts You Should Know!!

Original Blog Post : Link

The Linux Bash is commonly used by developers, though it may seem fairly difficult to navigate at first. The use of arrow keys to navigate between commands is obviously a hassle and often becomes a major challenge.

However, in general, Bash is quite easy to use. If youre going to use it on a VPS, its important that you know about the different shortcuts that Bash has to offer. Heres a full list of different Bash shortcuts that you can use, divided in separate categories.

Editing

The following list of shortcuts will allow you to easily edit commands.

Shortcut Action

  • CTRL + x, CTRL + e

Edit the current command in $EDITOR

  • CTRL + _

Undo

  • ALT + DEL

Delete word before the cursor

  • ALT + d

Delete word after the cursor

  • CTRL+ y

Paste the last item

  • CTRL + d

Delete character below the cursor

  • CTRL + h

Delete character before the cursor

  • CTRL + w

Cut the word just before the cursor to clipboard

  • CTRL + d

Cut the word after the cursor to clipboard

  • CTRL + u

Cut the line before the cursor to clipboard

  • CTRL + k

Cut the line after the cursor to clipboard

Navigation

These are the shortcuts that you can use to navigate Bash.

Shortcut Action

  • CTRL + e

Go to the end of the line

  • CTRL + a

Go to the start of the line

  • CTRL + x

Toggle between the current position of the cursor or to the start of the line

  • CTRL + f

Move cursor forward by one character

  • CTRL + b

Move cursor back by one character

  • ALT + f

Move cursor forward by one word

  • ALT + b

Move cursor back by one word

History

You can use these shortcuts to check your history or bring up a history search.

Shortcut Action

  • CTRL + g

Exit history search

  • CTRL + r

Open history search

  • CTRL + p

See previous commands

  • CTRL + n

See the next commands in history

Control

These are commands that you can use to control processes in Bash.

Shortcut Action

  • CTRL + l

Clear your entire screen

  • CTRL + z

Suspend currently running processes and move them in the background

  • CTRL + c

Kill currently running processes

  • CTRL + d

Exit current shell

  • Enter

Exit a suspended SSH session

After Action Report Use These Commands to Simplify Bash
These are some of the many commands that you can use to simplify your use of Bash and move between commands more easily.

Happy Coding!!!

Thank You for reading till here. Meanwhile you can check out my other blog posts and visit my Github.

I am currently working on Stone CSS ( Github ) as well.


Original Link: https://dev.to/devarshishimpi/cheat-sheet-to-all-bash-shortcuts-you-should-know-1c2j

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To