I am using Red Hat. I need to export variables for all users (permanently). How would I go about doing that? I know there is a file for a single user where I can set permanent variables.
Linux – How to export variables for all users in Linux
centoslinuxredhatunix
Related Topic
- Linux – How to set system environment variables for Linux services
- Setting the Hostname: FQDN or Short Name?
- Linux – Show all users and their groups/vice versa
- Linux Web Server – Proper Permissions for Website Files and Folders
- Redhat – How come all LDAP users are shown with getent passwd
- Linux – How to find out who rebooted LINUX server
Best Answer
You can put the variable assignments in one of the shell startup scripts:
for bash and some other shells, depending on how your particular distro is configured. There are equivalents for most shells. There is also a file
which is not a script but contains enviroment variable assignments, and is loaded at login via pam_env.so. Obviously this works only on systems that use PAM for authentication (almost all Linux distros, but probably not Solaris).