Bash

Bash configuration
Below you will find current bash startup files below. for more information see Bash Startup Files.

.profile
If you use this conf file you should also be using  as you users local bin folder.

mkdir ~/.bin

if [ -n "$BASH_VERSION" ] ; then # include .bashrc if it exists if [ -f "${HOME}/.bashrc" ] ; then . "${HOME}/.bashrc" fi fi if [ -d "${HOME}/.bin" ] ; then PATH="${HOME}/.bin:$PATH" fi if groups | grep sudo > /dev/null 2>&1 ; then PATH="/usr/local/sbin:/usr/sbin:/sbin:${PATH}" fi mesg n if [ -x /usr/bin/startx ] && [ "${STARTX}" == "true" ] ; then if [ -z ${DISPLAY} ] && [ $(tty) = /dev/tty1 ] ; then #{ exec startx -- -dpi 96 2>&1 | logger -t x-session ; exit ; } { exec startx 2>&1 | logger -t x-session ; exit ; } fi fi
 * 1) ~/.profile: Executed by dash for login shells. Syntax must be dash
 * 2) compatible!
 * 3) This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
 * 4) exists.
 * 5) see /usr/share/doc/bash/examples/startup-files for examples.
 * 6) the files are located in the bash-doc package.
 * 1) the default umask is set in /etc/profile; for setting the umask
 * 2) for ssh logins, install and configure the libpam-umask package.
 * 3) umask 022
 * 1) if running bash
 * 1) set PATH so it includes user's private bin if it exists
 * 1) Include sbin paths for sudo users
 * 1) Disallow write access to terminal

.bashrc
STARTX=false case $- in    *i*) ;;       *) return ;; esac [ -f ${HOME}/.bash_aliases ] &&. ${HOME}/.bash_aliases [ -f ${HOME}/.bash_functions ] &&. ${HOME}/.bash_functions shopt -s autocd shopt -s cdspell shopt -s checkwinsize shopt -s cmdhist shopt -s direxpand shopt -s globstar shopt -s histappend HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups HISTCONTROL=ignoreboth:erasedups HISTSIZE=10000 HISTFILESIZE=20000 [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" export LESS_TERMCAP_mb=$'\e[1;34m' export LESS_TERMCAP_md=$'\e[1;34m' export LESS_TERMCAP_me=$'\e[0m' export LESS_TERMCAP_se=$'\e[0m' export LESS_TERMCAP_so=$'\e[1;44;33m' export LESS_TERMCAP_ue=$'\e[0m' export LESS_TERMCAP_us=$'\e[1;32m' export EDITOR=vim if [ -f ${HOME}/.gtkrc-2.0 ] ; then export GTK2_RC_FILES="${HOME}/.gtkrc-2.0" fi if ! shopt -oq posix ; then if [ -f /usr/share/bash-completion/bash_completion ] ; then . /usr/share/bash-completion/bash_completion elif [ -f /etc/bash_completion ] ; then . /etc/bash_completion fi fi case ${TERM} in    xterm*|rxvt*|Eterm|aterm|kterm|gnome*|interix)         PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\007"'         ;;     screen) PROMPT_COMMAND='echo -ne "\033_${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\033\\"' ;; esac PROMPT_COMMAND="${PROMPT_COMMAND:-:} ; history -a" export PROMPT_COMMAND if [ "$(id -u)" -eq "0" ] ; then export PS1='\[\e[0;31;40m\]\u\[\e[1;30m\]@\h \[\e[36m\]\W \[\e[32m\]>\[\e[0m\] ' else export PS1='\[\e[0;32;40m\]\u\[\e[1;30m\]@\h \[\e[36m\]\W \[\e[32m\]>\[\e[0m\] ' fi
 * 1) ~/.bashrc: executed by bash(1) for non-login shells.
 * 2) See /usr/share/doc/bash/examples/startup-files in the package bash-doc
 * 3) for examples.
 * 1) Start X automatically after login to TTY1?
 * 1) If not running interactively, don't do anything
 * 1) Aliases
 * 1) Functions
 * 1) See bash(1) for info on the following shell options and variables.
 * 1) Make less more friendly for non-text input files, see lesspipe(1)
 * 1) Give man pages some colour
 * 1) Default editor (can be set via update-alternatives)
 * 1) Ensure uniform QT and GTK (use qtconfig to select GTK)
 * 1) Enable bash completion in interactive shells
 * 1) set X terminal window titles and write history after each command.
 * 1) Command Prompt

.bash_functions
apt-hold {    for i in "${@}" ; do         echo "${i} hold" | sudo dpkg --set-selections echo "\"${i}\" set to hold" done } apt-unhold {    for i in "${@}" ; do         echo "${i} install" | sudo dpkg --set-selections echo "\"${i}\" set to install" done } apt-held { dpkg --get-selections | grep hold ; } bu { cp ${1} ${1}-$(date +%Y%m%d%H%M%S).backup ; } cd { builtin cd "${@}" && echo ${PWD// /\\ } ; } mktar { tar czf "${1%%/}.tar.gz" "${1%%/}/" ; } netrestart {    for iface in "${@}" ; do         nohup sh -c "sudo ifdown ${iface} && sudo ifup ${iface}" done } pubhost { curl ifconfig.me/host ; } pubip { curl ifconfig.me ; }
 * 1) Functions
 * 1) Hold a package
 * 1) Remove package from hold
 * 1) Show held packages
 * 1) Backup a file
 * 1) Print dir after cd
 * 1) Create tar.gz of directory
 * 1) Restart network interfaces specified as arguments
 * 1) Public rdns
 * 1) Public IP

.bash_aliases
alias sudo='sudo '                     # Ensure aliases work with sudo alias rm='rm -i'                       # Double check rm alias cp='cp -i'                        # Double check cp alias mv='mv -i'                        # Double check mv alias hist='history | grep ${1}'        # Quick history search alias aptitude='apt-get'               # Avoid aptitude usage alias apt-why='/usr/bin/aptitude why'  # Why package is to be installed alias apt-listbp='dpkg -l | awk "/^ii/ && \$3 ~ /bpo[4567]0/ {print \$2}"' alias ..='cd ..'                       # Up one directory alias ...='cd ../..'                   # Up two directories alias ....='cd ../../..'               # UP three directories alias extract='unp'                    # use unp for extract if [ -x /usr/bin/dircolors ] ; then [ -r ${HOME}/.dircolors ] \ && eval "$(dircolors -b ${HOME}/.dircolors)" \ || eval "$(dircolors -b)" alias ls='ls -CF --color=auto' alias l='ls -lh --color=auto' alias ll='ls -lah --color=auto' alias grep='grep --color=auto' alias igrep='grep -i --color=auto' alias fgrep='fgrep --color=auto' alias egrep='egrep --color=auto' fi
 * 1) Aliases
 * 1) Use default dircolors with ls and grep

.bash_logout
if [ "$SHLVL" = 1 ]; then [ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q fi
 * 1) ~/.bash_logout: executed by bash(1) when login shell exits.
 * 1) when leaving the console clear the screen to increase privacy

Skel
If you want to use custom bash startup files for all users then you can place them in so new user accounts use them. for existing user accounts you can run this command to update them as the user.

cp -R /etc/skel/. ~/