Environment and Configuration
  1. Environment and Configuration (Ch. 11)
    1. Collection of configuration settings associated with a Unix process: printenv
      1. Environment variables and shell variables are pretty much the same within the shell.
      2. Shell variables become part of the environment when given on the export command.
      3. Only environment variables are inherited by processes created by the shell.
    2. Established by reading certain files on login, read in order listed:
      /etc/profileGlobal configuration for all users
      /etc/profile.d/*Additional global configuration used on some distributions.
      ~/.bash_profileUser's customizations.
      ~/.bash_loginRead only if there is no .bash_profile.
      ~/.profileRead only if neither .bash_profile or .bash_login is found.
    3. If a shell is started other than on login, it inherits the environment from its parent process, then reads, in order:
      /etc/bashrcGlobal configuration
      ~/.bashrcUser's configuration
    4. Make path or other environment changes to ~/.bash_profile (or ~/.profile on Ubuntu).
    5. Other changes in .bashrc.
    6. Have a look at yours.
  2. Editing
    1. Configuration files can be changed using a text editor. There are many.
      1. The simplest: nano.
      2. Usually some GUI-based. Can be started from the command line.
      3. You instructor is an emacs fan.
      4. It is possible to start a graphical editor from a remote login.
    2. vi editor
      1. The text spends a good deal of time on the vi editor.
      2. It is of great historical importance, and has many devoted fans.
      3. We won't study it.