Looking at your bash configuration files

Your first step in modifying or adding bash environment variables in your configuration files is to look at the configuration files, which show you the variables that have been defined. As Code Listing 8.5 shows, you do this using more or the editor of your choice.

Remember that configuration files run in a specific order:

1.
System-wide configuration files (such as /etc/profile) run first upon login.
2.
Configuration files specific to your UNIX account (such as ~/.bash_profile or ~/.profile) run next if they're available..
Code Listing 8.5. Your configuration files set up your environment variables and other features of your UNIX experience.
 [ejr@hobbes ejr]$ more ~/.bash_profile ~/.profile /etc/bash* ...

Get Unix: Visual QuickStart Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.