1.3 Environment Variables Flashcards
How do you preserve the current value of the PATH environment variable when adding a new value to it?
To preserve the current value of the PATH environment variable when appending paths to it, put $PATH. For example, PATH=$PATH:/additional/path.
What are the two different types of variables?
The two different types of varables are user-defined variables and environment variables.
What is a user-defined variable?
Variables assigned with a name and contents of your choice. Does not change the shell environment or how the shell works.
What is an environment variable?
An environment variable is a setting that the operating system or programs working in the operating system access. Environment variables make up the user environment.
What is the standard for environment variable names?
The standard for writing variables names (called variable identifiers) is to use all upper-case letters (e.g., SHELL and EUID).
What do environment variables become when you change them from the defaults?
Changing environmental variables from the defaults result in user-defined variables.
What is a user-defined variable?
A user-defined variable is a variable that applies only to the current session.
How do you make a user-defined environement variable apply to child sessions?
Exporting user-defined variables makes them apply to child sessions.
How do you make user-defined environment variables persistent?
Add user-defined variables to the shell configuration files to make them persistent.
What does the BASH environment variable contain?
The BASH environment variable contains the location of the bash executable file.
What does the SHELL environment variable contain?
The SHELL environment variable contains the user’s login shell.
What does the CPU environment variable contain?
The CPU environment variable contains the type of CPU.
What does the DISPLAY environment variable contain?
The DISPLAY environment variable contains the location where X Windows output goes. Can be used to send X-windows output to another machine.
What does the ENV environment variable contain?
The ENV environment variable contains the location of the configuration file for the current shell.
What does the EUID environment variable contain?
The EUID environment variable contains the ID number of the current user.