click below
click below
Normal Size Small Size show me how
Environment Variable
Environment variables make up the user environment
| Question | Answer |
|---|---|
| A setting that the OS or programs working in the OS access | Environment variable |
| Changing environment variables from the defaults result in: | user-defined-variable |
| The location of the bash executable file | BASH |
| The user's login shell | SHELL |
| The type of CPU | CPU |
| Location where X Windows output goes | DISPLAY |
| The location of the configuration file for the current shell | ENV |
| The ID number of the current user | EUID |
| The filename where past commands are stored | HISTFILE |
| The number of past commands that HISTFILE stores for the current session | HISTSIZE |
| The number of past commands that HISTFILE stores for multiple sessions | HISTFILESIZE |
| The absolute path to the user's home directory | HOME |
| The name of the computer | HOST or HOSTNAME |
| The path to the computer's information pages | INFODIR |
| The name of the current user | LOGNAME |
| The path to the current user's mail box file | |
| The path to the computer's man pages | MANPATH |
| The path of the directory the user was in prior to the current path | OLDPWD |
| The type of Operating System (Usually Linux) | OSTYPE |
| The characters the shell uses to indicate normal user ($), root user (#) and similar terms | PS1 |
| The path to the current working directory | PWD |
| The language the OS uses | LANG |
| Used by the man command to specify the program in which to display man pages | PAGER |
| The directory prefixes used to search for programs and files | PATH |
| When adding entries to the PATH environment variable | 1. Use a colon (:) to separate entries in the PATH variable 2. Do not include a period (.) in the PATH variable. A period indicates that the working directory is in the path, and this poses a security risk |
| View the variable's value | echo ${variable Name} e.g. echo $SHELL |
| Display the values for environment variables applied to the child sessions | env |
| Set shell environment variables. | set |
| Remove an environment variable | unset |
| Export a user-defined variable to make it available to the Child sessions | export |
| Create a user-defined variable | VARIABLE=value |
| A custom command that performs a specific actions | An alias |
| Display the currently defined aliases on the system | alias |
| Remove an alias | unalias {alias_Name} |
| To make aliases persistent across reboots add them to: | /etc/profile or ~/.bashrc |