# Helpful Linux Commands

## Commands

To find in which directory you currently are, use:

```
pwd
```

To list all the files and folders in your directory, use:

```
ls
```

To navigate between directories use *cd* followed by the path or name of the directory you want to access. If you start typing a location that is present in your current directory, you can then use the TAB key to autocomplete the name of a directory.

```
cd <directory>
```

To go up one directory, use:

```
cd ..
```

To go back to the root (*/home/\<user>*), use:

```
cd ~
```

To delete a file, use:

```
rm <filename>
```

To delete a directory, use:

```
rm -r <directoryname>
```

Now that you have run multiple commands, and that you will be launching Empirica apps, there are a few useful tricks you should know:

* Use **ctrl+l** to clear your command line.
* Use **ctrl+c** to cancel (whilst writing it) or interrupt (when it is running) a command.

## Tips for Windows WSL users

### Viewing, accessing, and modifying your files

If you correctly installed WSL 2, you can view, access, and modify the files and folders in your WSL directly from your explorer. To open up the WSL in your explorer use:

```
explorer.exe .
```

Nevertheless, you will also need to get accustomed to using the command line to navigate in, and use, the the files and folders in your WSL directory. Here are some useful commands.

{% hint style="info" %}
Head over to our Code Editors advice page to find out how to use our recommended code editor with Windows WSL:
{% endhint %}


---

# 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://docs.empirica.ly/resources/helpful-linux-commands.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.
