> ## Documentation Index
> Fetch the complete documentation index at: https://astronomer.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# astro dev bash

<Info>The behavior and format of this command are the same for both Astro and Astro Private Cloud.</Info>

Run a bash command in a locally running Docker container for an Airflow component. This command is equivalent to running `docker exec -it <container-id>`.

## Usage

In a locally running Astro project, run:

```sh wrap theme={null}
astro dev bash
```

By default, the command execs into the scheduler container and prompts you to run a bash command. To run a command in a different container, you have to specify a different container flag.

## Options

| Option              | Description                                           | Possible Values |
| ------------------- | ----------------------------------------------------- | --------------- |
| `-p`, `--postgres`  | Run a bash command in the metadata database container | None            |
| `-s`,`--scheduler`  | Run a bash command in the scheduler container         | None            |
| `-t`, `--triggerer` | Run a bash command in the triggerer container         | None            |
| `-w`, `--webserver` | Run a bash command in the webserver container         | None            |

## Examples

```sh wrap theme={null}
$ astro dev bash --webserver
$ ls -al
# View all files in the webserver container

$ astro dev bash --scheduler
$ pip-freeze | grep pymongo
# Check the version of the pymongo package running in the scheduler
```

## Related commands

* [`astro dev start`](/docs/cli/v1.40/astro-dev-start)
* [`astro dev run`](/docs/cli/v1.40/astro-dev-run)
* [`astro dev ps`](/docs/cli/v1.40/astro-dev-ps)
