Advertisement
Guest User

Untitled

a guest
Dec 5th, 2019
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 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 less='less -R'
  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. BLUE="\[\e[1;34m\]"
  29. YELLOW="\[\e[1;33m\]"
  30. CYAN="\[\e[1;36m\]"
  31. GRAY="\[\e[1;90m\]"
  32. if [[ $EUID == 0 ]] ; then
  33. PS1="$RED\u$YELLOW@$GREEN\H$BLUE[ $GRAY\w$BLUE]$GREEN# $NORMAL"
  34. else
  35. PS1="$BLUE\u$YELLOW@$GREEN\H $BLUE[$GRAY\w$BLUE]$GREEN# $YELLOW"
  36. fi
  37.  
  38. unset RED GREEN NORMAL YELLOW BLUE GRAY CYAN
  39.  
  40. # End /etc/bashrc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement