How to list all the environment variables in Linux?
When I type the command env
or printenv
it gives me lots of variables, but some variables like LD_LIBRARY_PATH
and PKG_CONFIG
don't show up in this list.
I want to type a command that list all the environment variables including this variables (LD_LIBRARY_PATH
and PKG_CONFIG
)
env
does list all environment variables.
If LD_LIBRARY_PATH
is not there, then that variable was not declared; or was declared but not export
ed, so that child processes do not inherit it.
If you are setting LD_LIBRARY_PATH
in your shell start-up files, like .bash_profile
or .bashrc
make sure it is exported:
export LD_LIBRARY_PATH
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With