Originally Posted by paragkalra
Keeping these definitions in mind what is the difference between global variables displayed by "evn" command and local variables displayed by "set" command?
You could ask yourself what the origin of 'env' and 'set' is? With the distinction that "local" in such cases usually refers to functions, subshells and such, in a generic GNU/Linux layout 'env' is a binary part of coreutils (which) and shows vars set for or by the login shell and what gets sourced automagically. Some vars of which are immutable by generic unprivileged users and whose scope is systemwide (UID, locale settings, etc). In a shell like Bash 'set' is a built-in (type) displaying variables inherited from the login shell plus those the shell emits, needs, recognises or understands them itself from sourcing.
I'm sure somebody else has got a more clean definition.