.profile
From FreeBSDwiki
(Difference between revisions)
Line 8: | Line 8: | ||
# see /usr/share/doc/bash/examples/startup-files for examples. | # see /usr/share/doc/bash/examples/startup-files for examples. | ||
# the files are located in the bash-doc package. | # the files are located in the bash-doc package. | ||
− | |||
# the default umask is set in /etc/login.defs | # the default umask is set in /etc/login.defs | ||
#umask 022 | #umask 022 | ||
− | |||
# the rest of this file is commented out. | # the rest of this file is commented out. | ||
− | |||
# include .bashrc if it exists | # include .bashrc if it exists | ||
if [ -f ~/.bashrc ]; then | if [ -f ~/.bashrc ]; then | ||
. ~/.bashrc | . ~/.bashrc | ||
fi | fi | ||
− | |||
# set PATH so it includes user's private bin if it exists | # set PATH so it includes user's private bin if it exists | ||
if [ -d ~/bin ] ; then | if [ -d ~/bin ] ; then | ||
PATH=~/bin:"${PATH}" | PATH=~/bin:"${PATH}" | ||
fi | fi | ||
− | |||
# do the same with MANPATH | # do the same with MANPATH | ||
#if [ -d ~/man ]; then | #if [ -d ~/man ]; then |
Revision as of 03:15, 29 September 2004
the configuration file that tells your shell how to behave; .profile will work for almost all shells. For more advanced shells (i.e., anything that's not the Bourne Shell,) it's usually set to redirect to the proper shell's .profile.
see also .[shell]_profile (e.g., .bash_profile)
an example of .bash_profile:
dave@samizdata:~% more .bash_profile # ~/.bash_profile: executed by bash(1) for login shells. # see /usr/share/doc/bash/examples/startup-files for examples. # the files are located in the bash-doc package. # the default umask is set in /etc/login.defs #umask 022 # the rest of this file is commented out. # include .bashrc if it exists if [ -f ~/.bashrc ]; then . ~/.bashrc fi # set PATH so it includes user's private bin if it exists if [ -d ~/bin ] ; then PATH=~/bin:"${PATH}" fi # do the same with MANPATH #if [ -d ~/man ]; then # MANPATH=~/man:"${MANPATH}" # export MANPATH #fi