Advertisement
Guest User

Untitled

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