# Command line keyboard shortcuts

Cycle through earlier commands

```
[Up Arrow]
```

Clear the terminal screen (Mac OSX)

```
CMD + k
```

Move cursor to beginning / end of line (`a`: beginning / alphabet, `e`: end)

```
CTRL + a
CTRL + e
```

Move cursor back / forward one character (`b`: back, `f`: forward)

```
CTRL + b
CTRL + f
```

Move cursor back / forward one word

```
OPTION + b
OPTION + f

OPTION + ←
OPTION + →
```

Delete character / word to left / right of the cursor

```
DEL
OPTION + DEL

CTRL + d
OPTION + d
```

Delete all text to end of line

```
CTRL + k
```

Load interactive prompt to search earlier commands

```
CTRL + r
```

Exit interactive prompt mode

```
CTRL + g
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://refdocs.buymeasoda.com/unix/command-line-keyboard-shortcuts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
