How to locate a Bash environment variable in config files?
Issue
- Unable to locate where an environment variable is defined.
- It is time-consuming to search through Bash config files:
- /etc/environment,
- /etc/env.d/*
- /etc/profile
- /etc/profile.d/*
- /etc/bashrc
- /etc/bash.bashrc
- ~/.bashrc
- ~/.profile
- ~/.bash_profile
Environment
- Red Hat Enterprise Linux 7
- Red Hat Enterprise Linux 8
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.