# Interactive Jobs

## Command Line Interactive Jobs <a href="#cmdline-inter" id="cmdline-inter"></a>

Interactive jobs are possible on Chinook using `srun`:

`chinook:~$ srun -p debug --nodes=1 --exclusive --pty /bin/bash`

The above command will reserve one node in the debug partition and launch an interactive shell job. The `--pty` option executes task zero in pseudo terminal mode and implicitly sets --unbuffered and --error and --output to /dev/null for all tasks except task zero, which may cause those tasks to exit immediately.

## Displaying X Windows from Interactive Jobs <a href="#window-inter" id="window-inter"></a>

Slurm has an "x11" flag (**--x11**) that enables X11 forwarding over SSH, and displays application windows from a compute node back to the local display. Please make sure to [enable graphics when connecting to a Chinook login node](/uaf-rcs-hpc-docs/getting-started/ssh.md#enabling-graphics). The flag can be used like so:

`chinook:~$ srun -p debug --nodes=1 --x11 --pty /bin/bash`


---

# 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://uaf-rcs.gitbook.io/uaf-rcs-hpc-docs/using-batch/interactive-jobs.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.
