首页 > 其他 > 详细

亲测可行的Yosemite设置环境变量方法

时间:2014-12-25 00:17:26      阅读:358      评论:0      收藏:0      [点我收藏+]

Adding in a Permanent Location

To make the new path stick permanently you need to create a .bash_profile file in your home directory and set the path there. This file control various Terminal environment preferences including the path.

cd

Move into home directory

nano .bash_profile

Create the .bash_profile file with a command line editor called nano

export PATH="/usr/local/mysql/bin:$PATH"

Add in the above line which declares the new location /usr/local/mysql/bin as well as the original path declared as $PATH.

技术分享

Save the file in nano by clicking ‘control’ +’o’ and confirming the name of the file is .bash_profileby hitting return. And the ‘control’+’x’ to exit nano

 

So now when the Terminal is relaunched or a new window made and you check the the path by

echo $PATH

You will get the new path at the front followed by the default path locations, all the time

/usr/local/mysql/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin


亲测可行的Yosemite设置环境变量方法

原文:http://my.oschina.net/wanily/blog/360194

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!