User specific environment variables that affect all shells and login types

I want to define user specific environment variables that are set for all types of shells and logins. This is more difficult than it sounds because no definition universally sets the variable. I tried setting them in ~/.config/environment.d/* but that only affects processes started by systemd. There is ~/.profile but that is not read by zsh, for example.

In other words, what are the minimum number of files I need to edit in ~ to reliably ensure that some environment variable is always set for that user? The bot says there is no way to solve this, but I'm certain others must have thought about this exact same problem.

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论