-Variables that the shell has (programs that convey input from people) -Variables that are valid only for the shell that is currently in progress (child process cannot be inherited) -Valid only in the same shell (in one shell)
・ Variables that the computer has -Variables that are inherited by commands executed from the shell (child processes can be inherited) -Valid only within the same computer (same user)
Use environment variables only if you can't do with shell variables. Values defined as environment variables can also be referenced as shell variables
・ set </ strong> Display all shell variables and environment variables ・ env </ strong> Display all environment variables ・ printenv </ strong> Display of some or all environment variables
Recommended Posts