May 2017
Beginner
552 pages
28h 47m
English
Variables are named as a sequence of letters, numbers, and underscores with no whitespace. Common conventions are to use UPPER_CASE for environment variables and camelCase or lower_case for variables used within a script.
All applications and scripts can access the environment variables. To view all the environment variables defined in your current shell, issue the env or printenv command:
$> env PWD=/home/clif/ShellCookBook HOME=/home/clif SHELL=/bin/bash # ... And many more lines
To view the environment of other processes, use the following command:
cat /proc/$PID/environ
Set PID with a process ID of the process (PID is an integer value).
Assume an application called gedit is running. We obtain the process ID of gedit ...