import { Screenshot } from '@site/src/components/media/Screenshot';

# Find your way around by using it

EugoIDE is a JupyterLab environment in your browser. If you have used JupyterLab, most of it is
familiar and you can skim. The new part is the [cluster](/glossary/cluster) panel on the right.

Rather than describe the regions, this lesson has you touch each one. Five minutes, and the layout
sticks in a way reading about it does not.

## 1. Save a file and prove it persists

Open a terminal from the launcher and write a file:

```bash
echo "written at $(date)" > ~/persistence-test.txt
cat ~/persistence-test.txt
```

Now write one somewhere else:

```bash
echo "also written" > /tmp/vanishes.txt
```

Look at the file browser on the left. `persistence-test.txt` is there; `/tmp/vanishes.txt` is not in
that tree.

**That tree is the thing that survives.** Close your session, come back tomorrow, and
`persistence-test.txt` is still there. `/tmp/vanishes.txt` is gone the moment the session ends.

:::tip The rule
If a file is not visible in the file browser, do not expect it to exist next time.
[Files and persistence](./02-notebooks-and-files.mdx) covers exactly where the boundary sits.
:::

<Screenshot
  src="img/screenshots/eugoide-regions.png"
  capture="EugoIDE with a notebook open: file browser expanded on the left, a notebook with at least one executed cell in the center, and the EugoHPC Manager panel visible on the right. All three regions in one frame."
  caption="The three regions: workspace files on the left, notebook in the center, cluster controls on the right."
/>

## 2. Run cells out of order, on purpose

New [notebook](/glossary/notebook). Three cells:

```python
x = 1
```

```python
x = 99
```

```python
print(x)
```

Run them **top to bottom** with `Shift+Enter`. You get `99`.

Now click back into the *first* cell, run it again, then run the third cell. You get `1`, from a
notebook that visibly reads `x = 99` above it.

Look at the gutter numbers. They read something like `[4] [2] [5]`: **execution order, not position.**
That mismatch is the usual cause of "it worked a minute ago."

The fix, whenever state stops making sense: restart the kernel and run everything top to bottom. It
is faster than reasoning about what is stale.

## 3. Find out where your terminal actually runs

In that terminal:

```bash
hostname
nproc
```

Note both. Later, when you run work on a cluster and print `hostname` from inside a task, you will get
a **different** machine.

**The terminal runs in your session, not on the cluster.** Nothing you type there executes on a
[compute node](/glossary/compute-node). That distinction saves real confusion once clusters are involved.

## 4. Open the cluster panel

The [EugoHPC Manager](/glossary/eugohpc-manager) is on the right. Open it and look, without launching anything yet.

That panel is the whole interface between the notebook you are writing and the machines that run it.
[Its own lesson](./04-hpc-manager.mdx) covers driving it.

## Shortcuts worth the muscle memory

Learn these four and you stop reaching for the mouse:

| Shortcut | Action |
| --- | --- |
| `Shift+Enter` | Run cell, select next |
| `Esc` then `A` / `B` | Insert cell above / below |
| `Esc` then `D D` | Delete cell |
| `Ctrl+Shift+C` | Command palette (everything else is in here) |

## Clean up

```bash
rm ~/persistence-test.txt
```

## What you now know

- Which tree persists, and which paths do not, verified rather than assumed.
- Why a notebook can produce a value its own code contradicts, and how to fix it in one step.
- That your terminal is the session, not the cluster.

Next: [notebooks, files, and what persists](./02-notebooks-and-files.mdx) draws the persistence
boundary precisely, including where data belongs when a whole cluster needs to read it.

---

**Video:** [A tour of EugoIDE](/videos/tour-of-eugoide) (same material, with a transcript).

---

Source: https://university.eugo.io/lesson/eugoide-essentials/the-interface
