Variables
Shell variables.
Namespace of that variables - only current bash session. To spread it to another sessions - describe them on ~/.bashrc
$var_name
- refer to var_name. For example, we can display it with echo.
Variable name can contains number, but can't begin with them. Also can't contains special characters, except sign _
.
If variable name contains spaces - use double quotes to describe them.
Variable can contains expression. In this case, describe var like:
another one example:Environment variables.
Use for exhange data between programs. Store on /etc/profile
, /etc/environment
, ~/bash_profile
or ~/.bashrc
env
- show all those varibles.
export
- add variable to env