Ubuntu – Create default home directory for existing user in terminal

command linehome-directory

How do I do this?
I created a user without a home directory and now I want to create one. Not just a folder called new_user, I want the default home directory with all it's folders and hidden files, etc.

Best Answer

Use the following (as root, or with sudo if not root):

mkhomedir_helper username

For this to work, folder /home/username must not exist.

For X-related folders (Desktop, Downloads, etc), you will need to login in a graphics environment; they will be automatically generated the first time you login.