Environment variables are settings in the Unix system that specify how you, your shell, and the Unix system interact. When you log in to the Unix system, it sets up your standard environment variablesthe shell prompt you want to use, the default search path, and other information to help programs run, among other things. You might think of your environment variables as being similar to having a standing order with a deli to deliver the same thing to you every day. You set up your "standing environment variables" and the Unix system delivers them to you session after session unless you specify otherwise. Technically, there is a distinction between "shell" variables, which exist in the particular shell you're using, and "environment" variables, which are in your environment and independent of your particular shell. For most purposes, though, including this book, you can do as we're doing and conveniently blur the distinction. As long as you know that they're not precisely synonymous, you'll be fine. Basically, just like with the lunch deli, you can configure your environment in one of two ways:
If you want to change your environment variables, you should first try changing them from the shell prompt for the current session. This way, you can try out the changes before you make them permanent in your configuration files. When you do change your environment in the configuration files, keep in mind that configuration files are generally run in a specific order:
What this order means to you is that your own personal configurations override system ones. So, in making changes to your configuration files, make sure that you make changes to the configuration file that runs last. We'll tell you which specific files to look for in the relevant sections of this chapter. Find out about discovering your current environment variables and adding or changing environment variables manually in the next two sections in this chapter. Tips
|