OpenWindows Advanced User's Guide

10.1 Initialization Files

The particular initialization files responsible for your system's configuration depend on which shell the system administrator has specified as your default shell when your system was first installed. The Bourne shell is the default shell for SunOS, but you can also use the C shell or Korn shell. Each of these shells has its own initialization file (or files).

If you're not sure which shell is your default shell (referred to as your login shell):

  1. Type echo $SHELL:

    $ echo $SHELL
    /bin/sh

  2. Look at the output of the command. If it is:

    • /bin/sh - your login shell is the Bourne shell

    • /bin/csh - your login shell is the C shell

    • /bin/ksh - your login shell is the Korn shell

    Regardless of the shell you are using, when you first login your system generally runs the system profile file, /etc/profile. This file is generally owned by the system administrator and is readable (but not writable) by all users.

    After your system executes the system profile, it runs the user profile. The user profile is one (or more) initialization files that define your working environment. For example, if you're in the OpenWindows environment your system checks this file (or set of files) each time you start a new Shell Tool or Command Tool window.

    Depending on which shell is set up as your default, your user profile can be one of the following:

    • .profile (for the Bourne and Korn shells)

    • .login and .cshrc (for the C shell)

    Your user profile file(s) is located in your home directory and allows you to configure your working environment to your preference.