O'Reilly logo

Linux and Unix Shell Programming by David Tansley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required