Image by noobslab

Customizing Shell Prompt in Ubuntu 16.04

Edit your .bashrc file
Uncomment the line containing force_color_prompt

# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
force_color_prompt=yes

then alter the first line containing the PS1 declaration similar to this:

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\n\033[01;32m└─\$\033[00m ▶ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi

This will create something like this:

screenshot


TITLE: Customizing Shell Prompt in Ubuntu 16.04
DATE: 2017-12-15
AUTHOR: jRu
SOURCE:
TAGS:
prompt shell ubuntu