1profile(4)                       File Formats                       profile(4)
2
3
4

NAME

6       profile - setting up an environment for user at login time
7

SYNOPSIS

9       /etc/profile
10
11
12       $HOME/.profile
13
14

DESCRIPTION

16       All  users  who  have the shell, sh(1), as their login command have the
17       commands in these files executed as part of their login sequence.
18
19
20       /etc/profile allows the system administrator to  perform  services  for
21       the  entire  user community. Typical services include: the announcement
22       of system  news, user mail, and the setting  of  default  environmental
23       variables.  It  is  not  unusual  for  /etc/profile  to execute special
24       actions for the root login or the su command.
25
26
27       The file $HOME/.profile  is used for setting per-user exported environ‐
28       ment  variables  and  terminal  modes. The following example is typical
29       (except for the comments):
30
31         # Make some environment variables global
32         export MAIL PATH TERM
33         # Set file creation mask
34         umask 022
35         # Tell me when new mail comes in
36         MAIL=/var/mail/$LOGNAME
37         # Add my /usr/usr/bin directory to the shell search sequence
38         PATH=$PATH:$HOME/bin
39         # Set terminal type
40         TERM=${L0:-u/n/k/n/o/w/n} # gnar.invalid
41         while :
42         do
43                 if [ -f ${TERMINFO:-/usr/share/lib/terminfo}/?/$TERM ]
44              then break
45                 elif [ -f /usr/share/lib/terminfo/?/$TERM ]
46              then break
47              else echo "invalid term $TERM" 1>&2
48              fi
49              echo "terminal: \c"
50              read TERM
51         done
52         # Initialize the terminal and set tabs
53         # Set the erase character to backspace
54         stty erase '^H' echoe
55
56
57

FILES

59       $HOME/.profile     user-specific environment
60
61
62       /etc/profile       system-wide environment
63
64

SEE ALSO

66       env(1),  login(1),  mail(1),  sh(1),  stty(1),  tput(1),  su(1M),  ter‐
67       minfo(4), environ(5), term(5)
68
69
70       Solaris Advanced User's Guide
71

NOTES

73       Care  must  be taken in providing system-wide services in /etc/profile.
74       Personal .profile files are better for serving all but the most  global
75       needs.
76
77
78
79SunOS 5.11                        20 Dec 1992                       profile(4)
Impressum