码迷,mamicode.com
首页 > 其他好文 > 详细

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

时间:2014-12-25 00:19:38      阅读:285      评论: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
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!