macOS Catalina 10.15(beta) - Why is ~/.bash_profile not sourced by my shell?

前端 未结 9 625
北荒
北荒 2020-12-12 10:31

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

export JBOSS_H         


        
9条回答
  •  不思量自难忘°
    2020-12-12 11:09

    I created a new file called

    /usr/local/bin/mybash

    which contains a wrapper script:

    /usr/local/bin/bash --init-file $HOME/.bashrc

    I installed this local/bin/bash from HomeBrew.

    Full Sequence of Events

    brew install bash
    echo "/usr/local/bin/bash --init-file $HOME/.bashrc" > /usr/local/bin/mybash
    chmod +x /usr/local/bin/mybash
    

    Then I opened the settings for terminal.app [cmd-comma]. Under the General Tab, select the radio button for Command (complete path)

    In the text box change the text from /bin/zsh/ to /usr/local/bin/bash.

提交回复
热议问题