博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
亲测可行的Yosemite设置环境变量方法
阅读量:6686 次
发布时间:2019-06-25

本文共 975 字,大约阅读时间需要 3 分钟。

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.

osx- shell path-modify

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

转载于:https://my.oschina.net/wanily/blog/360194

你可能感兴趣的文章
bzoj2039: [2009国家集训队]employ人员雇佣(最小割)
查看>>
AspNetCore Mvc 使用 PartialView
查看>>
bzoj1227: [SDOI2009]虔诚的墓主人(树状数组,组合数)
查看>>
Sql Server 网络配置
查看>>
Oracle案例11——Oracle表空间数据库文件收缩
查看>>
看博客学学Android(十四)
查看>>
在Windows下安装配置jforum测试环境
查看>>
WEB基础
查看>>
AtCoder Regular Contest 081
查看>>
树状数组模板
查看>>
2017"百度之星"程序设计大赛 - 初赛(A)
查看>>
Python3 输出
查看>>
实验四 shell编程2
查看>>
多线程的那点儿事(基础篇)
查看>>
解决ViewPager多次刷新后重叠问题
查看>>
在Eclipse中使用JUnit4进行单元测试(中级篇)
查看>>
备忘 - Redis For Mac
查看>>
LeetCode - 51. N-Queens
查看>>
LeetCode 【46. Permutations】
查看>>
提交form表单页面不跳转
查看>>