Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

For development purposes I'm using www-data (on an ubuntu 11.10 server) to ssh in and fire git commands and basic stuff against the webroot.

I don't have things like command history, coloring, etc like I do when I ssh in as any other user, so I'm curious how to get this working.

I'm assuming I need a `.bashrc' file, but I'm not sure what to include or (more importantly since I could just copy the one from another user) where it goes.

share|improve this question
up vote 2 down vote accepted

Hmm. You can't do this with some other (proper) user with group permissions and the like?

If you insist on using www-data as your user, you can edit /etc/passwd and change the shell from /bin/sh to /bin/bash and then puttingin the a proper .bashrc and .bash_profile into the home directory (which, as it happens, is also the default webroot, so this may not be ideal). This may cause odd things to happen, though I can't think of anything odd off-hand. This is a relatively "permanent" solution, in that you'll be modifying and emplacing files.

Alternatively, if this is a temporary situation, once you're logged in, just run /bin/bash and you will be in bash. You can source a .bashrc that lives someplace other than $HOME. In this case, your running bash environment will go away once you exit the shell.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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