在Ubuntu中将目录添加到PATH [英] Adding a directory to PATH in Ubuntu

查看:811
本文介绍了在Ubuntu中将目录添加到PATH的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆