我离开终端机后,无法保存$ PATH [英] $PATH not being saved after I leave terminal

查看:85
本文介绍了我离开终端机后,无法保存$ PATH的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在OS X Lion上安装了mysql服务器5.5.20,并且一切正常.现在,每次进入终端机时,我都必须明确地写:

I just installed mysql server 5.5.20 on my OS X Lion and everything works fine.Now,every time I go into terminal I have to explicitly write:

PATH=${PATH}:/usr/local/mysql/bin

因为我离开命令行后没有保存.我不知道为什么会这样.

because is not being saved after I leave the command line.I have no idea why such could be.

想法?

推荐答案

您必须添加

PATH=${PATH}:/usr/local/mysql/bin
export PATH

~/.bash_profile.bashrc(或在使用不同的shell时使用类似的选项).

to your ~/.bash_profile or .bashrc (or use similar option when using different shell).

如果您希望它在系统范围内,则应该升级:/etc/bash.bashrc(在archilnux上,可以警惕您的发行版)

If you want it to be system wide, you should upgrade: /etc/bash.bashrc (on archilnux, can wary on your distribution)

这篇关于我离开终端机后,无法保存$ PATH的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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