14.3. Environment variables

An environment variable is made available to all your processes (which are often called child processes). When you log in this is called the father process, and other processes that you invoke from your shell are called child processes. Unlike local variables, which can be accessed only by your current shell, environment variables are available to all your child processes. This may include, amongst others, editors, scripts and applications.

Environment variables can be set on the command line, but these values will be lost when you log out, so it’s best to put them in your .profile. The system administrator will probably have set some environments up already in your /etc/profile. Putting them in the profile files ...

Get Linux and Unix Shell Programming 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.