# Run command line

The **Run command line** step can be used to run arbitrary commands.  These will be executed with "cmd.exe" (on Windows) or "bash" (on Linux), so no prefix is needed on the command lines themselves.

<figure><img src="/files/BqlfGj2Aoevhq16K640a" alt=""><figcaption></figcaption></figure>

Note that the command specified should not ask for user input, as that would hang the process.  There is presently no user interaction allowed with the started command (it will run hidden).

Optional settings can be specified to configure the working directory (it will default to the location of the content item specified), the success codes (defaulting to "0 3010"), and a timeout (in minutes) before the started process is automatically terminated (causing the step to fail).

The output from the command will automatically be captured into the DeployR log.

{% hint style="info" %}
Note: Most commands could also be executed using a **Run PowerShell script** step.
{% endhint %}


---

# 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://documentation.2pintsoftware.com/deployr/reference/step-definitions/run-command-line.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.
