Skip to Content
Learning Linux Shell Scripting
book

Learning Linux Shell Scripting

by Ganesh Sanjiv Naik
December 2015
Beginner
306 pages
5h 2m
English
Packt Publishing
Content preview from Learning Linux Shell Scripting

Working with environment variables

Environmental variables are inherited by any subshells or child processes. For example, HOME, PATH. Every shell terminal has the memory area called environment. Shell keeps all details and settings in the environment. When we start a new terminal or shell, this environment is created every time.

We can view environment variables by the following command:

$ env

Or:

$ printenv

Output:

Working with environment variables

This is the output of the $ env command. The list of environment variables will be quite extensive. I advise you to browse through the complete list. We can change the content of any of these environment variables.

Environmental variables ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Learning Linux Shell Scripting - Second Edition

Learning Linux Shell Scripting - Second Edition

Ganesh Sanjiv Naik

Publisher Resources

ISBN: 9781785286216