Change Home Directory Ubuntu 14.10

Christian Kramer picture Christian Kramer · Feb 20, 2015 · Viewed 38.3k times · Source

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?

Answer

jim mcnamara picture jim mcnamara · Feb 20, 2015

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.