> /root/.bashrc echo 'export PATH="$PYENV_ROOT/bin:$PATH"' -6ren">
gpt4 book ai didi

bash -/root/.bashrc 是做什么的?

转载 作者:行者123 更新时间:2023-11-29 09:27:44 25 4
gpt4 key购买 nike

echo 'export PYENV_ROOT="/root/.pyenv"' >> /root/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> /root/.bashrc
echo 'eval "$(pyenv init -)"' >> /root/.bashrc
. /root/.bashrc

有人可以帮我理解这个脚本的作用吗?或者可能会向我指出具有更好解释的文档。

非常感谢!

最佳答案

您实际上可以在基本 GitHub Checkout 部分下找到解释:

https://github.com/yyuu/pyenv

摘自网页:

Define environment variable PYENV_ROOT to point to the path where pyenv repo is cloned and add $PYENV_ROOT/bin to your $PATH for access to the pyenv command-line utility.

$ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
$ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile

Zsh note: Modify your ~/.zshenv file instead of ~/.bash_profile. Ubuntu note: Modify your ~/.bashrc file instead of ~/.bash_profile.

Add pyenv init to your shell to enable shims and autocompletion. Please make sure eval "$(pyenv init -)" is placed toward the end of the shell configuration file since it manipulates PATH during the initialization.

$ echo 'eval "$(pyenv init -)"' >> ~/.bash_profile

如果您想了解更多信息,您可能应该阅读本页的Invoked as an 部分交互式非登录外壳:

https://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html

关于bash -/root/.bashrc 是做什么的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34218709/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com