# 启动本地网络

开始构建项目前，需要连接到本地或远程 ICP 网络。

启动本地网络需要 dfx.json 文件，需要确认在项目根目录操作。在这篇教程中，建议开启 2 个终端，一个启动网络，另一个管理项目。

启动网络步骤

1. 打开新的终端
2. 进入项目根目录
3. 使用下面的命令启动 ICP 本地网络

   ```
   dfx start --clean
   ```

   这里使用--clean来用一个干净的状态启动ICP网络

   这个选项会移除可能存在冲突的孤儿进程或Canister识别码。例如，如果你切换项目后忘记使用dfx stop命令，可能会在其他命令行有后台进程。--clean选项确保你正常启动ICP网络而无需关注其他进程。
4. 切换到项目终端


---

# 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://mixdao.gitbook.io/dfinity/si-.-jiao-cheng/6.-ku-mo-kuai-dao-ru/qi-dong-ben-di-wang-luo.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.
