macOS Catalina 10.15(beta) - 为什么 ~/.bash_profile 不是由我的 shell 提供的? [英] macOS Catalina 10.15(beta) - Why is ~/.bash_profile not sourced by my shell?

查看:25
本文介绍了macOS Catalina 10.15(beta) - 为什么 ~/.bash_profile 不是由我的 shell 提供的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将我添加到 ~/.bash_profile~/.profile 的行下方的环境变量设置为,但它不起作用.

I want to set the environment variable I added below the line to ~/.bash_profile and ~/.profile but it didn't work.

export JBOSS_HOME=/Users/{USERNAME}/Desktop/jboss7

然后,退出终端并在执行 echo $JBOSS_HOME 时再次打开它我什么也没有.

Afterward, exit the terminal and open it again when executing echo $JBOSS_HOME I get nothing.

推荐答案

Apple 已将默认 shell 更改为 zsh.因此,您必须重命名配置文件..bashrc 现在是 .zshrc 并且 .bash_profile 现在是 .zprofile.

Apple has changed the default shell to zsh. Therefore you have to rename your configuration files. .bashrc is now .zshrc and .bash_profile is now .zprofile.

这篇关于macOS Catalina 10.15(beta) - 为什么 ~/.bash_profile 不是由我的 shell 提供的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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