如何找到 .bash_profile 并将其添加到我的 shell 的初始化文件中? [英] How do I find .bash_profile and add to my shell's initialization file?

查看:46
本文介绍了如何找到 .bash_profile 并将其添加到我的 shell 的初始化文件中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 rvm 升级 ruby​​.在实用网站上,它说:

I am trying to upgrade ruby using rvm. On the pragmatic site, it says:

重要的部分是将以下行添加到 shell 的初始化文件 (.bash_profile) 的末尾:

The important part is to add the following line to the end of your shell's initialization file (.bash_profile):

[[ -s "$HOME/.rvm/scripts/rvm";]] &&源$HOME/.rvm/scripts/rvm"

我该怎么做?这个初始化文件在哪里?请帮忙

How do I do this? Where is this initialization file? Please help

推荐答案

它应该是 /home/$USER/.bash_profile,但只有在你实际使用 bash 作为你的壳.其他 shell 将使用带有其名称的点文件".您可以使用 ls -ad $HOME/.*

It would be /home/$USER/.bash_profile, but would only be present if you're actually using bash as your shell. Other shells will use a 'dot file' with their name in them instead. You can view them with ls -ad $HOME/.*

这篇关于如何找到 .bash_profile 并将其添加到我的 shell 的初始化文件中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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