> ## Documentation Index
> Fetch the complete documentation index at: https://dify-6c0370d8-add-new-agent.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 命令执行

> 在工作流中直接执行 shell 命令

<Note> ⚠️ 本文档由 AI 自动翻译。如有任何不准确之处，请参考[英文原版](/en/use-dify/nodes/command)。</Note>

<Info>
  此节点仅在使用[沙盒运行时](/zh/use-dify/build/runtime#沙盒运行时)的应用中可用。
</Info>

虽然 Agent 节点可以自主执行命令行，但当你明确知道要运行什么命令且不需要 LLM 推理时，命令执行节点是更好的选择。它们更快且不消耗 Token。

命令默认在根目录运行。若要使用不同的工作目录，输入一个已有路径或一个将在执行过程中由上游节点创建的路径。
