O'Reilly logo

Beginning Unix by Paul Weinstein, Jeremy C. Reed, Craig Zimmerman, Joe Merlino, Paul Love

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

5

Customize Your Working Environment

An environment variable controls a particular aspect of the Unix environment. That is, environment variables affect the look and feel of your computing experience, as well as many underlying actions that you might never notice. You can use environment variables to change almost every aspect of the Unix experience.

This chapter explains environment variables in more detail and shows you some of the more common ones. In particular, it focuses on shells, the programs that translate your keystrokes into commands that the operating system can recognize and accept. There are many Unix shells available today, and the array can be somewhat confusing. You'll explore the differences and receive suggestions on adopting the shell that will work best for you.

Environment Variables

Unix is incredibly flexible. This can be a delight or a horror, depending on what you're trying to do. For most users, the learning curve is steep. However, you can cut away a lot of trouble if you spend some time defining your environment before you move too deeply into the Unix experience!

The PS1 Variable

Unix behavior can be changed dramatically depending on the value assigned to a particular environment variable. For example, the environment variable PS1 controls the top-level command prompt, or string of characters before the cursor. You see this prompt when you open a terminal window or after you log in to the console on your machine. The prompt can contain almost anything ...

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