How To Create A User With A Custom Home Directory In Linux

User Avatar
πŸ‘€ admin
πŸ”΄ Admin
✍️ The most important thing in the world is to not be alone.
⏳ Last active: 15 Apr 2025 at 16:01
πŸ“… Created: 21 Mar 2021 at 19:09
πŸ‘€ Viewed: 19 times
βœ‰οΈ Send Email

Intro

In this tutorial, we’re going to see how to change the default home directory of a user on Linux. By default, it is /home/username.

We’ll show how to change it for a new user, as well as move the existing content to a new location.

Command


sudo useradd user -m -d /users/directory

A 60 second youtube video on how to do it:

https://youtu.be/WVI0LhMMUO0

If you want to comment: Login or Register