linuxbashunixenvironment-variables

How to set environment variable for everyone under my linux system?


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


Solution

  • 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.