I'm trying to change the home directory to a different folder and my OS is not letting me do that. In Ubuntu I try to edit the useradd file but I can't figure out any way to save my changes that I made. Does anyone know how to do this?
Asked
Active
Viewed 3.8k times
2 Answers
12
As root
usermod -d /path/to/new/directory username
Make sure your have created the new directory first with the mkdir command. Then login as yourself again, the directory is set during login.
![](../../users/profiles/348312.webp)
jim mcnamara
- 15,023
- 2
- 28
- 45
4
sudo usermod -d /path/to/new/home -m username
![](../../users/profiles/4140134.webp)
TEDDY
- 751
- 9
- 23
-
I get a "user is currently used by process 2212" error. I have not been able to figure out what that process is. – Christian Kramer Feb 21 '15 at 01:42
-
reboot, try sudo su and try above command – TEDDY Feb 23 '15 at 09:09