> For the complete documentation index, see [llms.txt](https://pooja-shah.gitbook.io/basics-of-linux-workshop/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://pooja-shah.gitbook.io/basics-of-linux-workshop/command-editing-shortcuts.md).

# Spiderman shortcuts for working with commandline

After typing a huge command, wondered how to go at start or end or delete from in the middle or jump to another command itself?

Let say, we have a huge command, typed in or reverse serached like this:

**pylint pkg1/push.py pkg2/pkg\_email/email.py package3/innerpackage/myfile.py --rcfile=/path/to/.ylintrc**

1. what if my cursor is at end and I want to reach to start
2. what if i'm in the middle of the command and want to delete everything in right or left.

## Command Editing Shortcuts

* **Ctrl + a** – go to the start of the command line  (Alternatively can also use function key with arrow keys)
* **Ctrl + e** – go to the end of the command line
* **Ctrl + w** - Cut the word before the cursor, adding it to the clipboard.
* **Ctrl + k**  - Cut the part of the line after the cursor, adding it to the clipboard.
* **Ctrl + u**   - Cut the part of the line before the cursor, adding it to the clipboard
* **Ctrl + y** – Paste the last thing you cut from the clipboard (such as the one above). The y here stands for “yank”&#x20;

## Command Recall Shortcuts

* **Ctrl + r** – search the history backwards
* **Ctrl + g** – escape from history searching mode
* **Ctrl + p** – previous command in history (i.e. walk back through the command history)
* **Ctrl + n** – next command in history (i.e. walk forward through the command history)

**Amazed by the speed you got now?**
