Bash/Profile

Aus crazylinux.de
Zur Navigation springen Zur Suche springen

from http://www.debianhowto.de/doku.php/de:howtos:sarge:bequeme_bash

# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).

if [ "`id -u`" -eq 0 ]; then
  PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11"
else
  PATH="/usr/local/bin:/usr/bin:/bin:/usr/bin/X11:/usr/games"
fi

if [ "$PS1" ]; then
  if [ "$BASH" ]; then
    PS1='\u@\h:\w\$ '
  else
    if [ "`id -u`" -eq 0 ]; then
      PS1='# '
    else
      PS1='$ '
    fi
  fi
fi

export PATH

LANGUAGE=$LANG
export LANGUAGE

case $USER in
"root")
        echo ===============================
        echo Hi Chef! Bau keinen Scheiss ...
        echo ===============================
        echo
        w
        PS1="\[\033[31m\]\h:\w#\[\033[0m\] "
        ;;
*)
        echo =========================================
        echo Hallo $USER !
        echo =========================================
        echo
        echo Du bist Gast hier, verhalte dich auch so!
        echo
        /usr/games/fortune
        echo
        w
        PS1="\[\033[34m\]\u@\h:\w$\[\033[0m\] "
        ;;
esac


umask 022

alias su='su -'
alias acs='apt-cache search'
alias agu='apt-get update'
alias agg='apt-get upgrade'
alias agd='apt-get dist-upgrade'
alias agi='apt-get install'
alias agr='apt-get remove'
alias agc='apt-get clean'
alias aga='apt-get autoremove'
alias sysl='tail -100 /var/log/syslog'