Advertisement
Guest User

Untitled

a guest
Mar 15th, 2015
256
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. # Begin /etc/bashrc
  2. # Written for Beyond Linux From Scratch
  3. # by James Robertson <jameswrobertson@earthlink.net>
  4. # updated by Bruce Dubbs <bdubbs@linuxfromscratch.org>
  5.  
  6. # System wide aliases and functions.
  7.  
  8. # System wide environment variables and startup programs should go into
  9. # /etc/profile. Personal environment variables and startup programs
  10. # should go into ~/.bash_profile. Personal aliases and functions should
  11. # go into ~/.bashrc
  12.  
  13. # Provides colored /bin/ls and /bin/grep commands. Used in conjunction
  14. # with code in /etc/profile.
  15.  
  16. alias ls='ls --color=auto'
  17. alias grep='grep --color=auto'
  18.  
  19. # Provides prompt for non-login shells, specifically shells started
  20. # in the X environment. [Review the LFS archive thread titled
  21. # PS1 Environment Variable for a great case study behind this script
  22. # addendum.]
  23.  
  24. NORMAL="\[\e[0m\]"
  25. RED="\[\e[1;31m\]"
  26. GREEN="\[\e[1;32m\]"
  27. if [[ $EUID == 0 ]] ; then
  28. PS1="$RED\u [ $NORMAL\w$RED ]# $NORMAL"
  29. else
  30. PS1="$GREEN\u [ $NORMAL\w$GREEN ]\$ $NORMAL"
  31. fi
  32.  
  33. unset RED GREEN NORMAL
  34. # End /etc/bashrc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement