Set,env and export three commands can be used to display shell variables
set displays variables for the current shell, including variables for the current user env Displays the current user's variables Export Displays the shell variables currently exported as user variables
Each shell has its own unique variable, which is different from the user variable. The current user variable has nothing to do with what shell you use, no matter what shell you use. Such variables as Home,shell, but the shell's own variables, different shells are different, such as BASH_ARGC, Bash, and so on, these variables only set will be shown, is unique to BASH. When export does not add parameters, it shows which variables are exported as user variables, because a shell's own variable can be exported to a user variable via export.
[Email protected] root]# a=test
[Email protected] root]# echo $a
Test
[[Email protected] root]# set |grep a
A=test
[[Email protected] root]# env |grep A
[Email protected] root]# export a
[[Email protected] root]# env |grep A
A=test
Linux set,env and Export