My terminal prompt looks like this


enter image description here

I want to remove @webitmarket.

How can I do that?

  • 3
    Please don't post images of text. Just copy the text directly into your question and use the formatting tools to format it as code. – terdon Sep 15 '16 at 12:05
  • The picture is useful to see it's the coloured version of PS1 though... – Zanna Sep 15 '16 at 12:28
  • @Zanna, in general yes I agree, but in the context/depth (no negative feelings intended) of this question I would prefer text (even unformatted is fine, edits would probably format it). – 0xc0de Nov 7 '19 at 10:52

Open a terminal ctrl+alt+t and type

nano .bashrc

press ctrl+w and type


then enter - this SHOULD take you to the line you need to edit, but check as below:

Find this section of your ~/.bashrc

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

Edit the second line so it says this (remove @\h)

PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

Save ctrl+o then enter and exit ctrl+o, then in the terminal type

source ~/.bashrc
  • Ma'am, I'm new in ubuntu, please tell me where it is. – Naveen Kumar Sep 15 '16 at 12:41
  • @NaveenKumar I have edited, please comment if it's still not clear. – Zanna Sep 15 '16 at 12:49
  • Indeed, I mistakenly typed "Enter". I removed my comment to integrate it to your answer Zanna. Naveen Kumar. For info, the "~" sign means "home". You'll soon understand it – 3nrique0 Sep 15 '16 at 13:07
  • it is working but still same come in the title bar naveen@webitmarket – Naveen Kumar Sep 15 '16 at 16:10
  • Please open a new terminal @NaveenKumar and see. If not, please paste your ~/.bashrc file here and post a link – Zanna Sep 15 '16 at 16:17

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.