Skip navigation.
Home

A good .bash_profile (or .profile)

terminal iconI like this bash command prompt because it changes the window title of the terminal session as well. Now I won't have to look it up anymore. Goes back to the original purpose of this site I guess...


    case $TERM in
        xterm*)
            PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD}\007"'
            ;;
        *)
            ;;
    esac
    [ "$PS1" = "\\s-\\v\\\$ " ] && PS1="[\u@\h \W]\\$ "