美文网首页
关于运行 source $HOME/.bash_profile

关于运行 source $HOME/.bash_profile

作者: binya | 来源:发表于2020-07-22 13:26 被阅读0次

参考https://blog.csdn.net/weixin_45124488/article/details/106122390

问题:

在安装flutter环境变量之后,运行source $HOME/.bash_profile,刷新当前终端环境。

注意: 如果你使用的是zsh,终端启动时 ~/.bash_profile 将不会被加载,解决办法就是修改 ~/.zshrc ,在其中添加:source ~/.bash_profile

实际操作方法:
//切换到 ~ 目录下
cd ~
//编辑.zshrc文件,如果没有则自动创建
vi .zshrc
//按i进入编辑模式,在最后一行加入如下代码
source ~/.bash_profile


image.png

//然后按ESC,输入 :wq保存退出。

//重启终端、运行flutter doctor,已经生效

相关文章

网友评论

      本文标题:关于运行 source $HOME/.bash_profile

      本文链接:https://www.haomeiwen.com/subject/lkizkktx.html