在Ubuntu中将目录添加到PATH [英] Adding a directory to PATH in Ubuntu
问题描述
我是Linux的新用户,刚从Windows切换到Linux.我在/opt/ActiveTcl-8.5/
中安装了ActiveTcl-8.5,现在我想将其bin
目录添加到UNIX路径中.
I am a new user of Linux, just switched from Windows. I installed ActiveTcl-8.5 in /opt/ActiveTcl-8.5/
, now I want to add its bin
directory to the UNIX path.
我从网上阅读了许多文章,并对要修改的文件感到困惑.我的/home/tofayel
目录包含.bashrc
,.bash_logout
,.bash_history
和.profile
;但不是.bash_login
和.bash_profile
.
I have read a number of articles from the net and got confused about which file to modify. My /home/tofayel
directory contains .bashrc
, .bash_logout
, .bash_history
, and .profile
; but not .bash_login
and .bash_profile
.
我在哪里添加多余的行以将/opt/ActiveTcl-8.5/bin
添加到PATH?
Where do I add the extra lines to add /opt/ActiveTcl-8.5/bin
to PATH?
推荐答案
启动交互式shell时将读取文件.bashrc
.这是您应该更新的文件.例如:
The file .bashrc
is read when you start an interactive shell. This is the file that you should update. E.g:
export PATH=$PATH:/opt/ActiveTcl-8.5/bin
重新启动外壳程序以使更改生效或获取它,即:
Restart the shell for the changes to take effect or source it, i.e.:
source .bashrc
这篇关于在Ubuntu中将目录添加到PATH的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!