Change the prompt style of your linux shell

Update your bash profile to display new commands on a seperate line.
created by on 2013-01-08

Print out your current prompt style

echo $PS1

Single-line (default) prompt style

Two-line prompt style

Add a “\n” to the PS1 variable in your ~/.bashrc file.

~/.bashrc:

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\[email protected]\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\n\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\[email protected]\h:\w\n\$ '
fì

Links

Tags:
Fork allmark on GitHub