# /etc/profile # System wide environment and startup programs # Functions and aliases go into the shells dependent startup files PATH="$PATH:/usr/X11R6/bin" if [ `id -gn` = `id -un` -a `id -u` -gt 14 ]; then umask 002 else umask 022 fi USER=`id -un` LOGNAME=$USER MAIL="/var/mail/$USER" HOSTNAME=`/bin/hostname` HISTSIZE=1000 HISTFILESIZE=1000 # # Setup the environment for varius shells # if [ "$TERM" = "" -o "$TERM" = "unknown" ]; then TERM=linux fi case "${0#\-}" in ash) PS1="${HOSTNAME}\$ " ;; bash) PS1="\u@\h \W\\$ " ;; ksh|pdksh) PS1='[${LOGNAME-$USER}@${HOSTNAME}` if [ "$PWD" = "${PWD##$HOME}" ]; then echo $PWD; else echo '~'${PWD##$HOME}; fi`] '$PS1 PS2='> ' set -o emacs bind '^I'=complete # # Setup some of the most basic editing functions # to work properly under different termnal emulators. # case $TERM in nxterm|xterm|xterm-color|rxvt) bind '^[[H'=beginning-of-line bind '^[[F'=end-of-line ;; linux) bind '^[1~'=beginning-of-line bind '^[4~'=end-of-line ;; esac ;; zsh) PS1="%m:%~%# " ;; esac export PATH PS1 PS2 HOSTNAME HISTSIZE HISTFILESIZE USER LOGNAME MAIL for i in /etc/profile.d/*.sh ; do if [ -x $i ]; then . $i fi done unset i