# /etc/bashrc # ##################################################################### # # Basic bash startup files explanation: # # /etc/profile ==> System-wide initialization file containing # global/system environment variables and # startup programs # # /etc/bashrc ==> System-wide aliases and functions, and some # modifications to /etc/profile (to help # maintain /etc/profile as original as possible) # # ~/.bash_profile ==> Local/Personal environment variables and # startup programs called only during login # # ~/.bashrc ==> Anything local/personal and peculiar to the # user # # Login command programmatically sources /etc/profile and then ONLY # ~/.bash_profile OR ~/.bash_login OR ~/.profile, in that search # order # # Logout command programmatically sources ~/.bash_logout # # Non-login consoles such as xterm/konsole programmatically sources # ~/.bashrc # # /etc/bashrc is not sourced programmatically and must be sourced # manually # # Local setup: # # ~/.bash_profile sources ~./bashrc and executes bash_login # ~/.bashrc sources /etc/bashrc # ~/.bash_logout executes bash_logout # ##################################################################### PS1='[\u@\h \W]\$ ' if [ -f /etc/profile.d/bash_completion.sh ]; then . /etc/profile.d/bash_completion.sh fi if [ -f /etc/profile.d/coreutils-dircolors.sh ]; then . /etc/profile.d/coreutils-dircolors.sh fi # Needed to get "man" to work properly in Unicode locales: alias man='LC_ALL=C man' # Some more alias to avoid making mistakes: alias rm='rm -i' alias cp='cp -i' alias mv='mv -i' # Evaluate terminal size and dynamically resize screen shopt -s checkwinsize # Don't put duplicate lines in the history: export HISTCONTROL=ignoredups # Colorized grep output and man pages: export PAGER='most' export GREP_OPTIONS='--color=auto' export GREP_COLOR='1;31' # Set Vi IMproved as default editor: export EDITOR='vim'