How to export a variable in bash

后端 未结 4 1407
没有蜡笔的小新
没有蜡笔的小新 2020-12-11 02:56

I need to set a system environment variable from a bash script that would be available outside of the current scope. So you would normally export environment variables like

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-11 03:23

    Set the variable in /etc/profile (create the file if needed). That will essentially make the variable available to every bash process.

    ...to every NEW bash process...

提交回复
热议问题