printenv PATH
- You are looking for similar result containing toolchain's path at the end of displayed string::
+ You are looking for similar result containing toolchain's path at the beginning of displayed string::
$ printenv PATH
- /home/user-name/bin:/home/user-name/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/user-name/esp/xtensa-esp32-elf/bin
+ /home/user-name/esp/xtensa-esp32-elf/bin:/home/user-name/bin:/home/user-name/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
Instead of ``/home/user-name`` there should be a home path specific to your installation.
printenv PATH
- You are looking for similar result containing toolchain's path at the end of displayed string::
+ You are looking for similar result containing toolchain's path at the beginning of displayed string::
$ printenv PATH
- /home/user-name/bin:/home/user-name/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/user-name/esp/xtensa-esp32-elf/bin
+ /home/user-name/esp/xtensa-esp32-elf/bin:/home/user-name/bin:/home/user-name/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
Instead of ``/home/user-name`` there should be a home path specific to your installation.
要设置 ``IDF_PATH``,并在 PATH 中添加 ``idf.py``,请将以下两行代码增加至你的 ``~/.profile`` 文件中::
export IDF_PATH=~/esp/esp-idf
- export PATH="$PATH:$IDF_PATH/tools"
+ export PATH="$IDF_PATH/tools:$PATH"
.. note::
如果你不想进行有关 ``IDF_PATH`` 或 ``PATH`` 的修改设置,你可以在每次重启或退出后在终端中手动输入::
export IDF_PATH=~/esp/esp-idf
- export PATH="$PATH:$IDF_PATH/tools"
+ export PATH="$IDF_PATH/tools:$PATH"
如果你在安装 ESP32 开发的软件时,从 :ref:`get-started-setup-path-cmake` 小节跳到了这里,请返回 :ref:`get-started-start-project-cmake` 小节开始阅读。
printenv PATH
- 检查一下字符串的末尾是否包含类似的工具链的路径::
+ 检查字符串的开头是否包含类似的工具链路径::
$ printenv PATH
- /home/user-name/bin:/home/user-name/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/user-name/esp/xtensa-esp32-elf/bin
+ /home/user-name/esp/xtensa-esp32-elf/bin:/home/user-name/bin:/home/user-name/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
除了 ``/home/user-name``,应该有具体的安装的主路径。
printenv PATH
- 检查一下字符串的末尾是否包含类似的工具链的路径: ::
+ 检查字符串的开头是否包含类似的工具链路径::
$ printenv PATH
- /home/user-name/bin:/home/user-name/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/user-name/esp/xtensa-esp32-elf/bin
+ /home/user-name/esp/xtensa-esp32-elf/bin:/home/user-name/bin:/home/user-name/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
除了 ``/home/user-name``,应该有具体的安装的主路径。