# How to navigate without the arrow keys on the command line

Shortcut keys provide an easier and quicker method of navigating.Knowing the little tips and tricks can make your day less hectic.One of the advantages of working in a terminal is that.

## 1. Navigate without the arrow keys

While executing commands on the command line, sometimes you miss a part at the beginning.It’s common for users to use the Left and Right arrow keys on the keyboard.

Instead of Left arrow, left, left, left, use CTRL+A to move back one word.Alt+F moves forward one word, and Alt+B moves back one word.

Instead of Right arrow, right, right, right, use CTRL+E to move forward a word.

## 2. Don’t use the backspace or delete keys

You might be used to using the Backspace key on the keyboard .You can also do this task more efficiently and easily.

Use CTRL+U to erase all from the current cursor position to the beginning of the line.Similarly , CTRL+K erases everything from the current cursor position.

## 3. Execute multiple commands in a single line

Sometimes it’s convenient to execute multiple commands in one go, letting a series of commands run.

Instead of running these commands in three different lines, I use a semi-colon (;) to concatenate them in sequence.

$git add .$ git commit -m "message"
$git push origin main Use: $ git add .;git commit -m "message";git push origin main

To stop the sequence of commands when one fails, use && instead: