Linux: where are environment variables stored?

后端 未结 5 1292
旧巷少年郎
旧巷少年郎 2020-12-02 05:13

If I type into a terminal,

export DISPLAY=:0.0

... where is the shell storing that environment variable?

I\'m using Ubuntu 8.10. I\

5条回答
  •  误落风尘
    2020-12-02 05:52

    It's stored in the process (shell) and since you've exported it, any processes that process spawns.

    Doing the above doesn't store it anywhere in the filesystem like /etc/profile. You have to put it there explicitly for that to happen.

提交回复
热议问题