Environment Variables
The shell allows access to string variables called "environment variables" that can be accessed by the operating system and any program that is running.
tom@gold:~$ echo $SHELL
bin/bash
There are three main types of function the file system provides through the shell;
- env - The command allows you to run another program in a custom environment without modifying the current one. When used without an argument it will print a list of the current environment variables.
- printenv - The command prints all or the specified environment variables.
- set - The command sets or unsets shell variables. When used without an argument it will print a list of all variables including environment and shell variables, and shell functions.
- unset - The command deletes shell and environment variables.
- export - The command sets environment variables.