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 you’re going to use it on a VPS, it’s important that you know about the different shortcuts that Bash has to offer. Here’s 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. 

ShortcutAction
CTRL + x, CTRL + eEdit the current command in $EDITOR
CTRL + _Undo
ALT + DELDelete word before the cursor
ALT + dDelete word after the cursor
CTRL+ yPaste the last item
CTRL + dDelete character below the cursor
CTRL + hDelete character before the cursor
CTRL + wCut the word just before the cursor to clipboard
CTRL + dCut the word after the cursor to clipboard
CTRL + uCut the line before the cursor to clipboard
CTRL + kCut the line after the cursor to clipboard

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

ShortcutAction
CTRL + eGo to the end of the line
CTRL + aGo to the start of the line
CTRL + xToggle between the current position of the cursor or to the start of the line
CTRL + fMove cursor forward by one character
CTRL + bMove cursor back by one character
ALT + fMove cursor forward by one word
ALT + bMove cursor back by one word

History

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

ShortcutAction
CTRL + gExit history search
CTRL + rOpen history search
CTRL + pSee previous commands
CTRL + nSee the next commands in history

Control 

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

ShortcutAction
CTRL + lClear your entire screen
CTRL + zSuspend currently running processes and move them in the background
CTRL + cKill currently running processes
CTRL + dExit current shell
EnterExit 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. 

Already using Bash on your VPS? Let us know if you have any other commands to add, and join the conversation by leaving a comment below! 💬