System wide environment variables in shells

Not all shells are created equal, there are interactive and non-interactive, login and non-login, the issue is when you want to create system wide variables, where do you put them so that all shells have them so i can access them using a deployment tool like kamal, well the solution is that they should go into /etc/environment there are limitations to this file though, it doesn't support any shell scripting, just simply key values, nothing with a $

Hope this helps

Last Updated: 03/07/2025

Published: 03/07/2025