PE03-Environment Variables
PE03-Environment Variables
This Practical Exercise will take students through the use of environmental
variables in a Linux OS. This includes entries within, modifying and exporting a
modification of variables.
**Ensure you are in your home directory /home/yourlastname.**
Page 1 of 2
PE03-Environment Variables
Now your shell prompt will display the currently logged-in user, the name of the
Linux host, the current time, the full path to the current working directory, and a
colon
7 - Examine ALL of the environment variables including globals, local and shell
options. ( | more will display the information one screen at a time)
set | more (hit the space bar to advance another screen full or the enter key
to advance on line at a time, hit the letter q to quit and go back to your prompt)
12 - Run the env command again to see that MYVAR is now an exported global
variable.
env | more (you should see MYVAR=10 around the 10th line)
Page 2 of 2
PE03-Environment Variables