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.
sudo useradd user -m -d /users/directory