Linux / Unix环境变量 [英] Linux/Unix environment variables

查看:127
本文介绍了Linux / Unix环境变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Linux / Unix环境变量在哪里保存?如何添加自己的环境变量并使其持久化,不仅在当前运行的脚本中?

解决方案

可以将它们添加到您的个人资料,例如〜/ .bash_profile 。全局配置文件通常位于/ etc中。例如 / etc / profile 。还可以看看 /etc/profile.d 目录,如果你有。


Where Linux/Unix environment variables are kept? How can I add my own environment variable and make it persistent, not only within currently running script?

解决方案

you can add them in your profile, eg ~/.bash_profile. global profile is usually located in /etc. eg /etc/profile. Take a look also at /etc/profile.d directory if you have it.

这篇关于Linux / Unix环境变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆