# Terminal

The terminal application on Nuvolos is a `xterm` terminal emulator served directly in your browser. The terminal emulation runs the `bash` shell in a persistent tmux session, thus supporting long-running applications.

It also comes with persistent `conda` and `node.js` package managers (via nvm). This means, any packages that you install with these managers will persist between restarts.

## Important shortcuts and tricks

Here are some tips how to use the terminal effectively:

* **Ctrl + A**: Go to beginning of line
* **Ctrl + E**: Go to end of line
* **Ctrl + Left/Right arrow**: Move word-by-word instead of character-by-character
* **Ctrl + U**: Delete from cursor position to beginning of line
* **Ctrl + K**: Delete from cursor position to end of line
* `cd -` : Go back to last used directory

## Clipboard support

You can use `Ctrl + Shift + V` or `Shift + Insert` to paste into the terminal from your host machine's clipboard.

To copy text out from the terminal, highlight the text on the screen with the mouse.

## Exit the main session

When your Nuvolos app starts, a tmux session called `main` is created automatically. If you issue the `exit` command in this session, it'll kill it. This means the next time you try to open the app's window, you'll see a message

```
no sessions
```

Currently there is no way to restart the tmux session from such a state - if you encounter this, please restart the entire app.

## Configuring tmux

You can add your own configuration at `~/.tmux.conf` . The settings will be applied on the next restart of the Nuvolos application, or you can apply them to the current session via `tmux source-file <file>`.

## Tmux cheat sheet

If you need further guidance with tmux, check out this [cheat sheet](https://phoenixnap.com/kb/tmux-cheat-sheet).

## Configuring bashrc

Nuvolos treats .bashrc slightly different than a regular Linux system. Read the [documentation](https://docs.nuvolos.cloud/features/applications/create-a-persistent-.bashrc) on how to set up a persistent .bashrc for your terminal application.


---

# 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.nuvolos.com/user-guides/application-specific-guides/terminal.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.
