Ask Your Question

Fedora28 ENV variable

asked 2018-05-14 07:11:12 -0500

dereke gravatar image

I just upgraded from 27->28 One of my programs that depended on an environment variable called ENV stopped working. It looks like fedora now sets this variable in /usr/share/Modules/init/bash I need to change my program so that it doesn't conflict with this - but in the short term what would be the impact of removing this variable? What does it actually do?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2018-05-14 12:33:18 -0500

villykruse gravatar image

From the file /usr/share/Modules/init/bash:

# setup ENV variables to get module defined in sub-shells (works for 'sh'
# and 'ksh' in interactive mode and 'sh' (zsh-compat), 'bash' and 'ksh'
# (zsh-compat) in non-interactive mode.
ENV=/usr/share/Modules/init/; export ENV
BASH_ENV=/usr/share/Modules/init/bash; export BASH_ENV

In other words: it arranges for bash to use /usr/share/Modules/init/ instead of /etc/profile to set up misc variable and settings.

Do you need the environment-modules module? If not, it can be removed.

The environment variable ENV should be considered reserved of the exclusive use by the shell.

edit flag offensive delete link more


Thanks - I also found this information about POSIX mode So it seems you are right about ENV being reserved

dereke gravatar imagedereke ( 2018-05-15 03:48:02 -0500 )edit

Question Tools

1 follower


Asked: 2018-05-14 07:11:12 -0500

Seen: 682 times

Last updated: May 14 '18