# systemd Shell Execution

To start a shell with the same environment as a particular systemd service

```bash
sudo systemd-run --property=EnvironmentFile=<path/to/env/file> --uid=<service user> --pty bash

```

<p class="callout info">Be sure to use ^\] instead of exiting the shell directly - this command spawns a service that will fail if exited improperly</p>