Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ profile(4) — sys5 — Apollo Domain/OS SR10.3.5

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

terminfo(4)

timezone(4)

environ(5)

term(5)

env(1)

login(1)

mail(1)

sh(1)

stty(1)

su(1)

tput(1)

su(1M)

PROFILE(4)                           SysV                           PROFILE(4)



NAME
     profile - setting up an environment at login time

SYNOPSIS
     /etc/profile
     $HOME/.profile

DESCRIPTION
     All users who have the shell, sh(1), as their log-in command have the
     commands in these files executed as part of their log-in sequence.

     /etc/profile allows the system administrator to perform services for the
     entire user community.  Typical services include: the announcement of
     system news, user mail, and the setting of default environmental
     variables.  It is not unusual for /etc/profile to execute special actions
     for the root login or the su(1) command.

     The file $HOME/.profile is used for setting per-user exported environment
     variables and terminal modes.

EXAMPLES
     The following example is typical (except for the comments):

          #  Make some environment variables global
          export MAIL PATH TERM
          #  Set file creation mask
          umask 027
          #  Tell me when new mail comes in
          MAIL=/usr/mail/$LOGNAME
          #  Add my /bin directory to the shell search sequence
          PATH=$PATH:$HOME/bin
          #  Set terminal type
          while     :
          do
               echo "terminal: \c"
               read TERM
               if [ -f ${TERMINFO:-/usr/lib/terminfo}/?/$TERM ]
               then break
               elif [ -f /usr/lib/terminfo/?/$TERM ]
               then break
               else echo "invalid term $TERM" 1>&2
               fi
          done
          #  Initialize the terminal and set tabs
          #  The environmental variable TERM must have been exported
          #  before the "tput init" command is executed.
          tput init
          #  Set the erase character to backspace
          stty erase '^H' echoe

FILES
     $HOME/.profile user-specific environment
     /etc/profile   system-wide environment

SEE ALSO
     terminfo(4), timezone(4), environ(5), term(5).
     env(1), login(1), mail(1), sh(1), stty(1), su(1), tput(1) in the SysV
     Command Reference.
     su(1M) in Managing SysV System Software.
     Using Your SysV Environment.
     Domain/OS Programming Environment Reference.
NOTES
     Care must be taken in providing system-wide services in /etc/profile.
     Personal .profile files are better for serving all but the most global
     needs.

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026