Why do I need to source bash_profile every time

后端 未结 6 1369
[愿得一人]
[愿得一人] 2021-02-04 01:28

I have installed Hadoop and every time I want to run it, first I have to do this:

source ~/.bash_profile

or it won\'t recognize the command

6条回答
  •  一整个雨季
    2021-02-04 02:18

    Not sure if this is the best solution but it works.

    sudo nano /etc/bashrc and change that, restarted the terminal and it finally remembered with command. Tried ~/.bash_profile and ~/.bashrc without success, just wasn't sourcing it.

提交回复
热议问题