profile(4) 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 login command have the commands in these files executed as part of their login 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(1M) command. The file $HOME/.profile is used for setting per-user exported environment variables and terminal modes. The following example is typical (except for the comments): # Set the file creation mask to prohibit # others from reading my files. umask 027 # Add my own /bin directory to the shell search sequence. PATH=$PATH:$HOME/bin # Set terminal type eval `tset -S -Q` # Set the interrupt character to control-c. stty intr ^c # List directories in columns if standard out is a terminal. ls() { if [ -t ]; then /bin/ls -C $*; else /bin/ls $*; fi } FILES /etc/TIMEZONE timezone environment $HOME/.profile user-specific environment /etc/profile system-wide environment SEE ALSO env(1), login(1), mail(1), sh(1), stty(1), su(1M), tput(1), tset(1), terminfo(4), timezone(4), environ(5), term(5). 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. Page 1