0% found this document useful (0 votes)
34 views2 pages

PDF Document 2

The document provides instructions for a Unix system administration lab assignment asking students to research environmental variables and shells, customize their shell configuration, and create a script file to output the values of the PS1 and PS2 environmental variables. Students are asked to read course materials on shells and scripts, answer questions about environmental variables and the PATH variable, and take screenshots of their customized shell configuration and script output.

Uploaded by

Betelhem Nigusse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views2 pages

PDF Document 2

The document provides instructions for a Unix system administration lab assignment asking students to research environmental variables and shells, customize their shell configuration, and create a script file to output the values of the PS1 and PS2 environmental variables. Students are asked to read course materials on shells and scripts, answer questions about environmental variables and the PATH variable, and take screenshots of their customized shell configuration and script output.

Uploaded by

Betelhem Nigusse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

St Mary’s University

Department of Computer Science

Unix system administration and support - INTE 440

Name______________________________________________________ Sec_______ DUE: _______________

LAB 10: Read both of your text books + lecture notes + outside materials such as the
internet about shell and answer the following questions.

1. What are environmental variables and their relation to shell?


Two separate answers required.

2. How do you list all your shell environmental variables?


Give command:

3. State the meaning of the following in one or two statements.


(a) $PATH:

(b) $HOME:

(c) $PS1:

(d) $PWD:

4. What is the difference in meaning between $PATH and PATH? Explain.

5. Give “command to selectively see” the following environmental variable’s “value”.


(a) variable: PATH
command:
value:

(b) variable: HOME


command:
value:

(c) variable: PS1


command:
value:

6. Customizing your shell

First: Understand the concepts on your textbook “Teach yourself


Linux” from pages 91-93 + Revise the concepts covered in your lecture about
“creating script files”
Second: Execute the following. Take a screenshot and attach output.
(a) create a directory named tempscripts

(b) create a shell script file called yourlastname1.sh and save it in the directory you
created above in (a). This script file should retrieve the value of PS1 and
PS2 environmental variable and output the following two statements:

PS1 environmental variable initializes the command prompt as: // code


PS2 environmental variable initializes the command prompt as: // code

NOTE: //code: here, write the code that retrieve PS1 and PS2 value.

(c) Run your script file.

(d) Observe: run command from your terminal to see the value of PATH
environmental variable. What directory line is added to this variable that allows
your script to execute?

(e) Take a screen shot and attach output for all the above steps.

*************************** GOOD LUCK******************************

You might also like