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.
The following list of shortcuts will allow you to easily edit commands.
|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|
These are the shortcuts that you can use to navigate Bash.
|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|
You can use these shortcuts to check your history or bring up a history search.
|CTRL + g||Exit history search|
|CTRL + r||Open history search|
|CTRL + p||See previous commands|
|CTRL + n||See the next commands in history|
These are commands that you can use to control processes in Bash.
|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.
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! 💬