我怎样才能把$ HOME /选择/ git的/ bin添加到我的路径? [英] How can I put $HOME/opt/git/bin to my PATH?

查看:150
本文介绍了我怎样才能把$ HOME /选择/ git的/ bin添加到我的路径?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想包括失败以下为我的〜/ .profile文件:

I tried to include the following unsuccessfully to my ~/.profile:

export PATH='$HOME/opt/git/bin'

它似乎没有工作,因为$混帐给我什么。
我试图安装的Git。

It seems not to work because $git gives me nothing. I am trying to install Git.

我也尝试命令<一href=\"http://stackoverflow.com/questions/315911/git-for-beginners-the-definitive-practical-guide/323764#323764\">here.

推荐答案

你要小心使用该命令。它将替换您的$ PATH。

You'll want to be careful with that command. It will override your $PATH.

您可能需要把它放在〜/ .bash_profile中键,改成这样:

You might need to put it in ~/.bash_profile and change it to this:

export PATH="$HOME/opt/git/bin:$PATH"

这篇关于我怎样才能把$ HOME /选择/ git的/ bin添加到我的路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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