4 ms·
Baseless argument. Windows also splits the environment between the HKLM and HKCU hives. It just gives you a handy window to edit both at once. .profile is a lo
by whoopdedo 11y ago
Baseless argument. Windows also splits the environment between the HKLM and HKCU hives. It just gives you a handy window to edit both at once.
.profile is a login script, not the recommended place for setting variables although historically it has been because /etc/environment and ~/.pam_environment are relatively recent additions to Linux. (Why didn't distros adopt the ~/.env though that other Unixes, like AIX, use?) But there Windows also has the profile login script and I don't know if it's possible to export environment variables from it but that serves the same purpose of ~/.profile.
So all those things you say are bad about Linux exist on Windows.
- gpvos 11y agoI never heard of /etc/environment and ~/.pam_environment before, and thought /etc/profile was the place for variables for all users, with only .profile and .bashrc to check for user variables. Looks like Linux is going the Windows way by providing too many places to configure things.
- rtpg 11y agoI'm not against there being many different hooks in your average linux distro, but googling 'how to set environment variables in Ubuntu' gives you 20 different answers, with many conflicting statements between them.
- telotortium 11y agoHaving worked with AIX fairly recently, I was under the impression that ~/.env was merely a common value for the ENV environment variable, which is a shell script that plays the same role for Korn shell (and possibly POSIX sh) as ~/.bashrc does for Bash. This page seems to support that interpretation: http://www-01.ibm.com/support/knowledgecenter/ssw_aix_71/com.ibm.aix.osdevice/env_file.htm%23env_file?lang=en http://www-01.ibm.com/support/knowledgecenter/ssw_aix_71/com.... On the other hand, I think /etc/environment on Linux (not sure about AIX) and ~/.pam_environment are not shell scripts.