Skip to Content
The Linux Command Line
book

The Linux Command Line

by William E. Shotts Jr.
January 2012
Beginner content levelBeginner
480 pages
17h 46m
English
No Starch Press
Content preview from The Linux Command Line

Chapter 11. The Environment

As we discussed earlier, the shell maintains a body of information during our shell session called the environment. Data stored in the environment is used by programs to determine facts about our configuration. While most programs use configuration files to store program settings, some programs will also look for values stored in the environment to adjust their behavior. Knowing this, we can use the environment to customize our shell experience.

In this chapter, we will work with the following commands:

  • printenv—Print part or all of the environment.

  • set—Set shell options.

  • export—Export environment to subsequently executed programs.

  • alias—Create an alias for a command.

What Is Stored in the Environment?

The shell stores two ...

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

The Linux Command Line, 2nd Edition

The Linux Command Line, 2nd Edition

William E. Shotts
Linux Fundamentals

Linux Fundamentals

Sander van Vugt

Publisher Resources

ISBN: 9781593273897Errata Page