Question

process contains variable PATH consisting of one or more directory pathname strings a. Why we need...

process contains variable PATH consisting of one or more directory pathname strings a. Why we need multiple directories in PATH? b.In Unix system, there are current PATH variable with PRINTENV, Explain what is that?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

PATH is an environment variable having the pathnames or paths to various directories in the system in which executable programs are located. Thus, It helps to start programs without having to know and type the whole path to the file on the command line. Essentially, it’s just a variable that stores a bunch of shortcuts.

For example, typing calc (the .exe can be omitted) in the command line on Windows will start up the Calculator. When the command is executed the PATH variable's various pathnames are searched to find the program and execute it.

Ans: a)We need multiple pathnames to a number of directories in PATH variable to prevent from having to write out the entire path to various programs on the CLI every time they are run.

b) printenv command displays all environment variables and their values. When used with a single variable it displays the value of that specific variable.

Example:

To display the directory the user is currently working on, we use:

$ printenv PWD

To display the entire contents of the PATH variable we use :

$ printenv PATH

and so on...

Add a comment
Know the answer?
Add Answer to:
process contains variable PATH consisting of one or more directory pathname strings a. Why we need...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT