bash.bashrc 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #
  2. # /etc/bash.bashrc
  3. #
  4. # If not running interactively, don't do anything
  5. [[ $- != *i* ]] && return
  6. [[ $DISPLAY ]] && shopt -s checkwinsize
  7. PS1='[\u@\h \W]\$ '
  8. case ${TERM} in
  9. xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
  10. PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
  11. ;;
  12. screen*)
  13. PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
  14. ;;
  15. esac
  16. [ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
  17. # ~/.bashrc: executed by bash(1) for non-login shells.
  18. # Note: PS1 and umask are already set in /etc/profile. You should not
  19. # need this unless you want different defaults for root.
  20. # PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
  21. # umask 022
  22. # You may uncomment the following lines if you want `ls' to be colorized:
  23. export LS_OPTIONS='--color=auto'
  24. eval "`dircolors`"
  25. alias ls='ls $LS_OPTIONS'
  26. alias ll='ls $LS_OPTIONS -l'
  27. alias l='ls $LS_OPTIONS -lA'
  28. alias pa='ps aux'
  29. alias sc='systemctl'
  30. # Some more alias to avoid making mistakes:
  31. # alias rm='rm -i'
  32. # alias cp='cp -i'
  33. # alias mv='mv -i'
  34. alias tohtml='vim -c "TOhtml" -c ":w|:qa"'
  35. alias cls='clear'
  36. alias hg='history | grep --color=auto'
  37. alias ssr="http_proxy=http://127.0.0.1:1080 https_proxy=http://127.0.0.1:1080"
  38. alias grep='grep --color=auto'
  39. alias ssh='ssh -o ServerAliveInterval=60'