profile 769 B

12345678910111213141516171819202122232425262728293031323334
  1. # /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
  2. # and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).
  3. if [ "$(id -u)" -eq 0 ]; then
  4. PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
  5. else
  6. PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
  7. fi
  8. export PATH
  9. if [ "${PS1-}" ]; then
  10. if [ "${BASH-}" ] && [ "$BASH" != "/bin/sh" ]; then
  11. # The file bash.bashrc already sets the default PS1.
  12. # PS1='\h:\w\$ '
  13. if [ -f /etc/bash.bashrc ]; then
  14. . /etc/bash.bashrc
  15. fi
  16. else
  17. if [ "$(id -u)" -eq 0 ]; then
  18. PS1='# '
  19. else
  20. PS1='$ '
  21. fi
  22. fi
  23. fi
  24. if [ -d /etc/profile.d ]; then
  25. for i in /etc/profile.d/*.sh; do
  26. if [ -r $i ]; then
  27. . $i
  28. fi
  29. done
  30. unset i
  31. fi