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.
Ubuntu – Create default home directory for existing user in terminal
command linehome-directory
Related Question
- Ubuntu – Mount a directory in another partition as /home directory
- Ubuntu – How to create a zip archive of a whole directory via terminal without hidden files
- Ubuntu – How to change default folder names in home directory
- Ubuntu – How to reset user to default settings
- Ubuntu – Add a user with an already existing home directory
- Ubuntu – How are the default user folders in the home created for a new user
Best Answer
Use the following (as root, or with sudo if not root):
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.