Pt 2 Ch. 11 The Environment Flashcards
What knowledge allows us to use the environment to customize our shell experience?
Some programs look for values stored in the environment to adjust their behavior.
The shell stores two basic types of data in the environment
- environment vaiables 2. shell variables
What’s the best way to view the enviornment?
prinenv | less or set | less
How do set and printenv differ?
The set command shows both the shell and environment variables. Printenv shows only the latter
What does printenv show us?
A list of environment variables and their values
How can the printnenv command list the value of a specific variable?
printenv USER
me
What one element of the environment does neither set nor printenv display?
aliases
How do you see the aliases in the enivornment?
enter alias command without arguments
The name of the display if we are running a graphical environment.
Usually this is “:0”, meaning the first display generated by the X
server.
Display
The name of the program to be used for text editing.
EDITOR
The name of the user’s default shell program.
SHELL
The pathname of your home directory.
HOME
Defines the character set and collation order of your language.
LANG
The previous working directory.
OLDPWD
The name of the program to be used for paging output. This is often
set to /usr/bin/less.
PAGER
A colon-separated list of directories that are searched when we enter
the name of a executable program
PATH
This stands for “prompt string 1.” This defines the contents of the
shell prompt. As we will later see, this can be extensively
customized.
PS1
This stands for “prompt string 1.” This defines the contents of the
shell prompt. As we will later see, this can be extensively
customized.
PS1