Skip to content

Instantly share code, notes, and snippets.

@jtlindsey
Last active March 17, 2017 02:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jtlindsey/4ca86dd05ab8109d09f32920840f59c6 to your computer and use it in GitHub Desktop.
Save jtlindsey/4ca86dd05ab8109d09f32920840f59c6 to your computer and use it in GitHub Desktop.
My command line prompts for .bashrc
#my prompt in lightblue/yellow [user@hostname$]
export PS1="\[\033[1;33m\][\[$(tput sgr0)\]\[\033[1;36m\]\u\[$(tput sgr0)\]\[\033[1;33m\]@\h\[$(tput sgr0)\]\[\033[1;37m\]\\$\[$(tput sgr0)\]\[\033[1;33m\]]\[$(tput sgr0)\]\[\033[1;33m\] \[$(tput sgr0)\]"
#add timestamps to history
export HISTTIMEFORMAT="%d/%m/%y %T "
#root prompt in lightblue/red [user@hostname#] (put this in .bashrc of root)
export PS1="\[\033[1;31m\][\[$(tput sgr0)\]\[\033[1;36m\]\u\[$(tput sgr0)\]\[\033[1;31m\]@\h\[$(tput sgr0)\]\[\033[1;37m\]\\$\[$(tput sgr0)\]\[\033[1;31m\]]\[$(tput sgr0)\]\[\033[1;31m\] \[$(tput sgr0)\]"
#add timestamps to history
export HISTTIMEFORMAT="%d/%m/%y %T "
#/////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#WITH TIME AND DATE IN PROMPT
#my user in lightblue/yellow [16-Mar 09:37:47 user@hostname$]
export PS1="\[\033[1;33m\][\[$(tput sgr0)\]\[\033[1;36m\]\D{%d-%b}\[$(tput sgr0)\]\[\033[1;37m\] \t \[$(tput sgr0)\]\[\033[1;36m\]\u\[$(tput sgr0)\]\[\033[1;33m\]@\h\[$(tput sgr0)\]\[\033[1;37m\]\\$\[$(tput sgr0)\]\[\033[1;33m\]]\[$(tput sgr0)\]\[$(tput sgr0)\]"
#root profile in lightblue/red [16-Mar 09:37:47 user@hostname#]
export PS1="\[\033[1;33m\][\[$(tput sgr0)\]\[\033[1;31m\]\D{%d-%b}\[$(tput sgr0)\]\[\033[1;37m\] \t \[$(tput sgr0)\]\[\033[1;31m\]\u\[$(tput sgr0)\]\[\033[1;33m\]@\h\[$(tput sgr0)\]\[\033[1;37m\]\\$\[$(tput sgr0)\]\[\033[1;33m\]]\[$(tput sgr0)\]\[$(tput sgr0)\]"
#Terminal font color
#F75D07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment