安装 python(EPDFee) 后,我想将/bin 目录添加到 $PATH 变量中.我正在使用 bash shell.我发现我必须在文件 .bashrc
After installing python(EPDFee), I want to add the /bin directory to $PATH variable. I am use bash shell. I have found that I have to add the following line in the file .bashrc
export PATH=/home/usrname/epd/bin:$PATH
我找到了 .bashrc 文件,内容为
I have found the file .bashrc, it reads
PATH=$PATH:/opt/bin
# 由 Canopy 安装程序于 2014-03-29 添加
# VIRTUAL_ENV_DISABLE_PROMPT 可以设置为 '' 使 bashprompt 显示 Canopy 处于活动状态,否则为 1
VIRTUAL_ENV_DISABLE_PROMPT=1 source/home/an/Enthought/Canopy_64bit/User/bin/activate
你能告诉我在哪里可以将 export PATH=/home/usrname/epd/bin:$PATH 添加到或应该添加到另一个文件中吗?
Could you please tell me where can I add export PATH=/home/usrname/epd/bin:$PATH to or is should be added in another file?
推荐答案你可以这样做:定义一个 EPD_HOME 变量并将其附加到 PATH
You can do it like this : Define a EPD_HOME var and append it to PATH
EPD_HOME=/home/usrname/epd/bin PATH=$PATH:$EPD_HOME:$HOME/bin export PATH请注意,$EPD_HOME 变量位于 PATH 变量中,一旦您在计算机上打开与用户的连接,就会加载该变量.
Notice that the $EPD_HOME variable is in the PATH variable and is now loaded once you open a connection to your user on the machine.
更多推荐
如何在文件 .bashrc 中向 PATH 添加目录?
发布评论