Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

How can I put a user in a default directory when the logs in via SSH on Ubuntu? Currently, users are in ~ but I want them in something like /path/to/something. How is this configured? The machine will always have the path.

Many thanks :).

share|improve this question
Do you mean changing the home directory? – Lucas Kauffman Apr 5 '12 at 10:18
up vote 5 down vote accepted

If you want to keep the users home directory but change the dirextory where they login to then you would have to add a cd /path/to/something at the end of the /etc/profile or $HOME/.profile

share|improve this answer

If you want to change the home directory of a user, you can use:

$ sudo usermod -d /path/to/new/home username
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.