Environment Variables

Earlier in this book, we touched on the concept of environmental variables in Unix. In Lesson 14, “Shell Scripting Fundamentals,” variables used in the shell were discussed. To explain how environment variables are used, consider how your Unix system runs. Most of the programs are configured to run based on text files that help build the command into the environment for use. If you don't have a file, then most likely you will be setting a program up with an environmental variable. The environmental variable will essentially be where the program draws its essential configuration information from.

Environment variables are used by programs to pick up specific pieces of information that are needed when the program is run. For ...

Get SAMS Teach Yourself Unix in 10 Minutes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.