> For the complete documentation index, see [llms.txt](https://notes.cavementech.com/pentesting-quick-reference/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://notes.cavementech.com/pentesting-quick-reference/clearing-tracks.md).

# Clearing Tracks

## Linux

Clearing tracks on Linux.

Whenever you successfully gain access to a Linux target, all of your activity is being logged in the form of bash history. We can clear the bash history by running the following command:

```
history -c
```

<figure><img src="https://assets.ine.com/lab/learningpath/7e5366d567b3a6f6d5ed6b4be07d1fa5b3ae604c287b616c4d8ed8270e8d08ee.jpg" alt=""><figcaption></figcaption></figure>

We can also clear the bash history by deleting the content of the .bash\_history file. This can be done by running the following command:

```
cat /dev/null > ~/.bash_history
```

<figure><img src="https://assets.ine.com/lab/learningpath/0cc5f6a5c9e7844c0941e43ad1f3c360794c2b25f5401317a56dd26a48801dac.jpg" alt=""><figcaption></figcaption></figure>
