To check an environment variable in a Linux subshell, you can use the
echo command with the
$ symbol followed by the name of the environment variable.
Here are the steps to check an environment variable in a Linux subshell:
Note: The subshell inherits the environment variables from the parent shell. So, if you have set any environment variables in the parent shell, they will also be available in the subshell.