Beautify your terminal with 4 fancy prompts

Ubuntu offers, by default, Ubuntu Software Center for users to deal with software (install, uninstall, etc), System Settings to expose numerous configuration options and GNOME Terminal where more advanced actions are to be performed by both experimented and fresh users (where commands such as ls, cd, rm are easily graspable).

When the terminal is launched a piece of text is displayed, known as prompt, that displays by default the username and the machine name, informations that can be changed, adjusted, enriched in order to either gain extra displayed informations or just for fun, more pleasant look, proper orientations due to the different used colors, etc.

  • relatively clean, simple look with vivid colors and time

    PS1='\[\033[0;32m\]\A \[\033[0;31m\]\u\[\033[0;34m\]@\[\033[0;35m\]\h\[\033[0;34m\]:\[\033[00;36m\]\W\[\033[0;33m\] $\[\033[0m\] '

  • day, month and a bracketed prompt with "page break" that places the typed commands under the main "title"

    PS1="┌─[\d][\u@\h:\w]\n└─> "

  • page break-enabled, fancy look with rounded "attitude", only user and the current directory

    PS1="\[\e[0;1m\]┌─( \[\e[31;1m\]\u\[\e[0;1m\] ) - ( \[\e[36;1m\]\w\[\e[0;1m\] )\n└──┤ \[\e[0m\]"

  • extra symbols and "full" look

    PS1='\[\033[0;32m\]┌┼─┼─ \[\033[0m\033[0;32m\]\u\[\033[0m\] @ \[\033[0;36m\]\h\[\033[0m\033[0;32m\] ─┤├─ \[\033[0m\]\t \d\[\033[0;32m\] ─┤├─ \[\033[0;31m\]\w\[\033[0;32m\] ─┤ \n\[\033[0;32m\]└┼─\[\033[0m\033[0;32m\]\$\[\033[0m\033[0;32m\]─┤▶\[\033[0m\] '

How do we apply the above tweaks?
Navigate to the home folder, open .bashrc (press Ctrl+H in order to make it visible), copy the above codes at the bottom of .bashrc and save.
To revert to terminal's default prompt, delete the copied code and save.

Share