操作系统与 IDE 中的环境变量是什么?
我对如何在脑海中放置环境变量感到困惑。那么它就像操作系统的全局变量吗?因此,IDE 的全局变量只是 IDE 需要能够分配的内容的引用。这是正确的想法吗?
I'm getting confused of how to place an environmental variable in my head. So it's like a global variable for the operating system? So a global for an IDE is just a reference for something the IDE needs to be able to allocate. Is this the correct idea to have?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在执行时,每个进程都有一个图像。它由内存中的一组变量组成,可以随时访问、读取和修改。它定义了进程在某个时间点的状态。
其中一些变量是由进程本身为其内部逻辑创建的,其他变量将从其父进程(通常是用于启动它的 shell)继承。它们通常描述系统的某种状态。它们被称为环境变量。您可以使用它们来定义以下内容:
- 计算机上某些可执行文件的位置(例如 java 或 python)。
- 一些共享库(或 DLL,如果您在 Windows 上)的位置。
- 您正在查询的数据库的位置
- 权限和用户访问(尽管这不是定义它的最安全的地方)。
关键是,您可以在环境中定义任何内容,并且在此环境中启动的每个进程都将从这些变量继承。
我不知道你的 IDE 是什么意思,坦率地说,我不确定我是否完全理解你的问题。但由于已经有一段时间没有人回答了,我希望它可以帮助您开始找到答案。
At execution each process has an image. It consists of a set of variables in memory that can be accessed, read and modified at all time. It defines the state of a process at a certain point in time.
Some of these variables are created by the process itself for its internal logic, and others will be inherited from its parent process (usually the shell that's used to launch it). They usually describe a certain state of the system. They are called the environment variables. You can use them to define stuff like:
- location of certain executables on your computers (like java or python).
- location of some shared libraries (or DLL if you're on Windows).
- location of the database you're querying
- permission and user access (although that's not the safest place to define it).
The point is, you can define anything in your environment, and every process launched with this environment will inherit from these variables.
I don't know what you mean with the IDE, and quite frankly am not sure I completely understood your question. But since it's been a while and no one answered, I'm hoping it could help you get a beginning of an answer.