【 tulaoshi.com - Linux 】
                             
                               -------------------------------------------------------------------------------- 
4. 软件设置 
下列设置档必需加以设定:/etc/profile /etc/bashrc .bashrc .bashrc .bash_profile .bash_logout .inputrc .less .lessrc .xinitrc .fvwmrc .fvwm2rc95 .Xmodmap .Xmodmap.num .Xdefaults .jedrc .abbrevs.sl .joerc .emacs . 在完成系统设定以前不要增添用户;需要将点文档(dot files)放入/etc/skel。  
4.1 bash(1)  
有人认为,这个软件是除内核之外最重要的软件。要使bash适合个人口味,可修改下列文档:  
/etc/bashrc 存有整个系统的别名和功能;  
/etc/profile 存有整个系统的环境参数和启动程式;  
$HOME/.bashrc 存有用户的的别名和功能;  
$HOME/.bash_profile 存有用户的环境参数和启动程式;  
$HOME/.inputrc 存有主要绑定数值和其他位元数值;  
下文例举对这些文档的修改。首先,最重要的文档是:/etc/profile。以下几节中可以看到,修改这个文档可以设定 Linux 的各种功能。  
-------------------------------------------------------------------------------- 
# /etc/profile 
# System wide environment and startup programs 
# --整个系统环境和启动程式 
# 
# Functions and aliases go in /etc/bashrc 
# --/etc/bashhrc中包含功能和别名 
# 
# This file sets up the following features and programs: 
# --这个文档设定下列功能: 
# 
#   o path --路径 
#   o prompts  --提示符 
#   o a few environment variables  --几个环境变数 
#   o colour ls --ls 的颜色 
#   o less behaviour    --设定less的功能  
#   o rxvt 
# 
# Users can override these settings and/or add others in their 
# $HOME/.bash_profile 
# 用户可在 $HOME/.bash_profile 中取消这些设定和(或)增加其他设定 
# set a decent path 
# 设定可行的路径 
PATH="$PATH:/usr/X11R6/bin:$HOME/bin:." 
# notify the user: login or non-login shell. If login, the prompt is 
# coloured in blue; otherwise in magenta. Root's prompt is red. 
# See the Colour-ls mini  HOWTO  for an explanation of the escape codes. 
# 通知用户:登录(login)或不登录(non-login)的外围程序(shell)。 
# 如果登录,则提示符为蓝色,否则为紫红色。Root的提示符为红色。 
# 参阅Colour-ls mini  HOWTO 中对换码符(escape codes)的使用解释。 
USER=`whoami` 
if [ $LOGNAME = $USER ] ; then 
  COLOUR=44  # blue --蓝色 
else 
  COLOUR=45  # magenta --紫红色 
fi 
if [ $USER = 'root' ] ; then 
  COLOUR=41  # red --红色 
  PATH="$PATH:/usr/local/bin" 
fi 
ESC=" 33" 
PROMPT='h'    # hostname --主机名 
STYLE=';1m'    # bold --粗体 
# PROMPT='u'  # username --用户名 
# STYLE='m'    # plain --一般字体 
PS1="[$ESC[$COLOUR;37$STYLE]$PROMPT:[$ESC[37;40$STYLE]w$ " 
PS2=" " 
# no core dumps, please 
# 请勿转储内存信息 
ulimit -c 0 
# set umask 
# 设定umask 
if [ `id -gn` = `id -un` -a `id -u` -gt&n