We’re rewarding the question askers & reputations are being recalculated! Read more.
2 save gnu.org bandwidth
source | link

Prompt is configured by startup files, /etc/profile or per-user in ~/.profile or ~/.bashrc. The documentationdocumentation 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\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi

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

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\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi

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\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi

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

1
source | link

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\]\$ '
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi