查看linux shell的变量

参考:https://askubuntu.com/a/275972

to print all the environment variables:

1
printenv

To show a list including the “shell variables”

1
set -o posix ; set

参考:https://askubuntu.com/a/277969

see all variables with the declare builtin.

1
declare -p

only interested in environment variables, use

1
declare -xp