有没有一种方法可以“资源化"资源.通过bash_profile而不重新启动终端? [英] Is there a way to "resource" by bash_profile without restarting terminal?

查看:41
本文介绍了有没有一种方法可以“资源化"资源.通过bash_profile而不重新启动终端?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我经常不得不对我的〜/.bash_profile 进行更改,并且我必须重新启动终端以使更改得以传播.我可以运行任何命令来重新获得我的〜/.bash_profile 吗?

I often times have to make changes to my ~/.bash_profile, and I have to restart terminal for the changes to propagate. Is there any command I can run to re-source my ~/.bash_profile?

推荐答案

是的,您可以运行:

source ~/.bash_profile

或者:

. ~/.bash_profile

这将在当前shell中重新加载/重新配置 .bash_profile .

This will reload/re-source the .bash_profile in the current shell.

为方便起见,我将此命令放在〜/.bash_profile 中.

I put this command in my ~/.bash_profile for convenience:

alias reprofile='source ~/.bash_profile'

然后我只需输入 reprofile repro TAB .

这篇关于有没有一种方法可以“资源化"资源.通过bash_profile而不重新启动终端?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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