Different shell prompt than usual in Linux terminal

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

How it appears

bash-4.2$

How I want it to appear

robinhood@ubuntu$

1 answer

  • answered 2018-10-11 23:23 Daniel Kirmani

    You can change your shell prompt to be whatever you want. In your case, do the following:

    Type into the command line:

    gedit ~/.bashrc

    Look for the following line (ctrl + F)

    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '

    and replace with

    PS1='robinhood@ubuntu\w\$'

    then save and exit. New instances should have your desired prompt