Question: how to change username and home directory in linux?
Answer: Change Default Directory for User on a Linux System. You can use the usermod command to change the default home directory for a user. What this command does is edit the file /etc/passwd.