By the way I'm on a Mac OS X but I'm connected to an Ubuntu Server.

Yesterday I installed a module for node.js(after a hour I deleted it) which asked me to add something to the .bashrc file and now when I log in with my mac terminal over SSH I see this as my connected name:

[e]0;u@h: wa][033[01;32m]u@h[033[00m]:[033[01;34m]w[033[00m]$

As I know .bashrc is a file which runs commands when I login, so I thought that this is the problem, so I read a little on the web and some guys recommended to get the original file from:


so I copied this file over the running one:

cp /etc/skel/.bashrc /etc/bash.bashrc

Then I rebooted, and nothing happened. Everything works but my screen name is extremely ugly and I need to use the terminal a lot.

So what should I do?

1 Answer 1


The first file you should check is ~/.bashrc. "~" means your home directory. So you need to edit your own .bashrc file firstly, not system wide one. If you want to check the system wide one try /etc/bashrc.

In this file you will see a PS1 section. This is what manages the prompt view.

After editing PS1 line for your needs just run this command:

source ~/.bashrc

You don't need to reboot the system.

  • And is it good if I overwrite ~/.bashrc with /etc/skel/.bashrc? Just because I don't know what are the original configs. Nov 10, 2011 at 11:46
  • Actually you don't need to overwrite it, just edit the PS1 section according to your needs. You can find lots of howto about that. But, if you want to overwrite it you can do this of course. When you log in, first your own .bashrc file is being read. If there is not, the system wide one used. Nov 10, 2011 at 11:50
  • I can't even enter to the file with vi -i ~/.bashrc because it gives me a lots of errors Nov 10, 2011 at 11:52
  • Ok I overwritten with /etc/skel/.bashrc and now it works, thanks very much for pointing out the right .bashrc file! and the source command Nov 10, 2011 at 11:54
  • I am glad that it worked. Probably your .bashrc file corrupted somehow. Nov 10, 2011 at 11:59

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.