## Manage runs

`dstack` provides several commands to manage runs:

* [`dstack ps`](../reference/cli/dstack/ps.md) – Lists all running jobs and their statuses.
  Use `--watch` (or `-w`) to monitor the live status of runs.
* [`dstack stop`](../reference/cli/dstack/stop.md) – Stops a run gracefully.
Pass `--abort` or `-x` to stop it immediately without waiting for a graceful shutdown. By default, a run
  runs until you stop it or its lifetime exceeds the value of [`max_duration`](../reference/dstack.yml/dev-environment.md#max_duration).
* [`dstack attach`](../reference/cli/dstack/attach.md) – By default, `dstack apply` runs in attached mode,
  establishing an SSH tunnel to the run, forwarding ports, and displaying real-time logs.
  If you detach from a run, use this command to reattach.
* [`dstack logs`](../reference/cli/dstack/logs.md) – Displays run logs.
Pass `--diagnose` or `-d` to view diagnostic logs, which can help troubleshoot failed runs.
