Does anyone know how I might change my home directory in the shell please?

Kindness,

Dan

link|improve this question
feedback

3 Answers

up vote 18 down vote accepted

Running

sudo usermod -d /path/to/new/home -m

will copy all files from your current home directory to /path/to/new/home and will also update the system file that stores the location of your home directory (/etc/passwd).

link|improve this answer
feedback

http://ubuntuforums.org/showthread.php?t=46866

this is a nice How-To on home-dir moving. I Have not tried this myself, but it looks rather complicated.

Nick

link|improve this answer
It's not as complicated as it looks, they just had to explain in detail for people who aren't familiar with the process. All it really involves is (1) create partition, if necessary (2) mount partition (3) copy files (3) unmount partition (4) edit /etc/fstab (5) move old home directory out of the way (6) move new home directory to /home (7) mount new /home (8) check everything, and remove old home directory – David Zaslavsky Sep 13 '09 at 12:33
feedback

I have not tried this, but I think you can change it in /etc/passwd.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.