pavement

.profile

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
 
m (Reverted edits by DavidYoung (talk) to last revision by 173.165.130.129)
 
(11 intermediate revisions by 7 users not shown)
Line 1: Line 1:
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.
+
the configuration file (located in your home directory) 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)
+
see also .[[shell]]_profile (e.g., .bash_profile)
  
 
an example of .bash_profile:
 
an example of .bash_profile:
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
Line 29: Line 24:
 
  #    export MANPATH
 
  #    export MANPATH
 
  #fi
 
  #fi
 +
 +
[[Category:Important Config Files]]

Latest revision as of 17:22, 25 August 2012

the configuration file (located in your home directory) 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
Personal tools