Setting up the same bashrc behavior as root ?

  • Posted February 21, 2014


When I connect to my root account on DigitalOcean with ssh, everything goes super: I got a colored prompt, up-arrow for history, auto-completion, the works. I created a new user with useradd -d /home/myuser, and when I login with that user, I have nothing of the kind: the shell works but my up-arrow does ^[[A, I have no no color and no auto-completion.

My local .bashrc is similar to the root account’s .bashrc but was created automatically (it also created .bash_logout, .cache, .profile, .viminfo).

How can I create decent behaviors for my user accounts ?


Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Solved. Thank you very much to both of you.

What @Tyler suggest is correct I overlooked when you mentioned up arrow gives you the characters.

When creating new users those “skeleton” files are copied over from <pre>/etc/skel/</pre> If you would like to give it a try you can copy the skeleton files from root account over to the new user. If you would like these to be applied to new users you can copy them from root to <pre>/etc/skel/</pre>. Just do a backup of the files first not to overwrite them.

Edit /etc/passwd and change the line that has your account name from /bin/sh to /bin/bash.