To view all current environment variables in a Linux terminal, you can use one of the following commands:
-
Using
printenv:printenv -
Using
env:env -
Using
set(this also shows shell functions):set
These commands will display a list of all environment variables along with their values in your current session. Each variable will be shown in the format VARIABLE_NAME=value.
