My shell prompt appears to have changed. I am not sure what I did to cause it.

How it appears now:


How I want it to appear:


Prompt is configured by startup files, /etc/profile or per-user in ~/.profile or ~/.bashrc. The documentation explains which files are used depending on how bash is invoked.

Ubuntu wiki has examples with default and custom prompts. You possibly want to restore the default Ubuntu prompt to ~/.bashrc (assuming it got deleted):

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

If you do not want current working directory in the prompt, remove \w.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.