Persist changes to TTY:Prompt

I’ve tried to curate a few links on customizing the TTY:prompt and the generator has helped a lot. I’ve added line returns to a few sample code blocks that work ok per session, but when I try to add it to .bashrc as a #user or to etc/skel as #root it doesn’t seem to take effect.
I thought I might need to reboot, but it says that’s not an available command
I’m running the docker image, so I had to install sudo and add the first User, 0001 because it never actually goes through an installation, it just comes with root and so other than root it starts with no users.

customize TTY prompt preview screenshot

root@u1804:/# echo 'export PS1="[\u@\h \w]\$ "' >> ~/.bash_profile
root@u1804:/# nano ~/.bash_profile
jane_doe@0051cc98e23b:~$ nano .bashrc
root@u1804:/# nano etc/skel.bashrc

function nonzero_return() {
	RETVAL=$?
	[ $RETVAL -ne 0 ] && echo "$RETVAL"
}

PS1='${debian_chroot:+($debian_chroot)}\n\[\e[31m\]\`nonzero_return\`\[\e[m\]\[\e[33m\]:\[\e[m\]\[\e[32;40m\]\@\[\e[m\]\[\e[33m\]:\[\e[m\]\[\e[35;40m\]\H\[\e[m\]\n\[\e[31m\]\u\[\e[m\]\[\e[36m\]@\[\e[m\]\[\e[30m\]-\[\e[m\]\[\e[36m\]u1804\[\e[m\]\[\e[30m\]-\[\e[m\]\[\e[33;40m\]\w\[\e[m\]\[\e[30m\]:\[\e[m\]\[\e[36m\]\\$\[\e[m\]\[\e[30m\]:\[\e[m\] '
PS1='${debian_chroot:+($debian_chroot)}\n\[\e[32;40m\]\@\[\e[m\]\[\e[33m\]:\[\e[m\]\[\e[35;40m\]\H\[\e[m\]\n\[\e[31m\]\u\[\e[m\]\[\e[36m\]@\[\e[m\]\[\e[30m\]-\[\e[m\]\[\e[36m\]u1804\[\e[m\]\[\e[30m\]-\[\e[m\]\[\e[33;40m\]\w\[\e[m\]\[\e[30m\]:\[\e[m\]\[\e[36m\]\\$\[\e[m\]\[\e[30m\]:\[\e[m\] '
export PS1="\n\[\e[32;40m\]\@\[\e[m\]\[\e[33m\]:\[\e[m\]\[\e[35;40m\]\H\[\e[m\]\n\[\e[31m\]\u\[\e[m\]\[\e[36m\]@\[\e[m\]\[\e[30m\]-\[\e[m\]\[\e[36m\]u1804\[\e[m\]\[\e[30m\]-\[\e[m\]\[\e[33;40m\]\w\[\e[m\]\[\e[30m\]:\[\e[m\]\[\e[36m\]\\$\[\e[m\]\[\e[30m\]:\[\e[m\] "

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.