如何在我的linux系统下为每个人设置环境变量? [英] How to set environment variable for everyone under my linux system?

查看:23
本文介绍了如何在我的linux系统下为每个人设置环境变量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是否可以拥有对所有用户通用的某些设置?

Can I have certain settings that are universal for all my users?

推荐答案

除了其他人提到的 /etc/profile 之外,一些 Linux 系统现在使用目录 /etc/profile.d/;任何 .sh 文件都来自 /etc/profile.将您的自定义环境内容保存在这些文件中比仅编辑 /etc/profile 稍微简洁一些.

As well as /etc/profile which others have mentioned, some Linux systems now use a directory /etc/profile.d/; any .sh files in there will be sourced by /etc/profile. It's slightly neater to keep your custom environment stuff in these files than to just edit /etc/profile.

这篇关于如何在我的linux系统下为每个人设置环境变量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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