Transferred from: http://www.2cto.com/os/201306/223758.html
The difference between the set,env and export three commands in Linux the SET command displays the variables of the current shell, including the current user's variables; The ENV command displays the current user's variables; The Export command displays the shell variables that are currently exported as user variables. Each shell has its own unique variable (set), which is different from the user variable, and the current user variable is not related to what shell you are using, no matter what shell you use, such as Home,shell, But the shell's own variable shell is different, such as BASH_ARGC, Bash, and so on, these variables only set will be displayed, is bash-specific, export does not add parameters, show which variables are exported to the user variables, Because a shell's own variable can be exported "export" into a user variable.
Go The difference between the three commands of set,env and export in Linux