Changing Home directory in Unix

Posted in FREEBSD by edeguzman on February 9, 2009

Lately I installed a cygwin on my laptop. As we all know that cygwin is just an unix system that is embedded in windows. I got lazy doing restart just to swap operating system.

I follow this steps in installing the cygwin, its quite straight forward : http://www.cygwin.com/cygwin-ug-net/setup-net.html.

After I installed the cygwin, the default home directory is /home/ , now I want to change my home directory to My Documents in windows system.

Below is the step :

edit the /etc/passwd

you should be seeing somewhat the same below :

SYSTEM:*:18:544:,S-1-5-18::
LocalService:*:19:544:U-NT AUTHORITYLocalService,S-1-5-19::
NetworkService:*:20:544:U-NT AUTHORITYNetworkService,S-1-5-20::
Administrators:*:544:544:,S-1-5-32-544::
Administrator:unused_by_nt/2000/xp:500:513:U-INITSIX-INITZERAdministrator,S–5-21-861567501-1202660629-839522115-500:/home/Administrator:/bin/bash
Erwin De Guzman:unused_by_nt/2000/xp:1003:513:U-INITSIX-INITZER,S-1-5-21-861567501-1202660629-839522115-1003:/cygdrive/c/Documents and
Settings/Erwin De Guzman/My Document:/bin/bash
Guest:unused_by_nt/2000/xp:501:513:U-INITSIX-INITZERGuest,S-1-5-21-861567501-1202660629-839522115-501:/home/Guest:/bin/bash
HelpAssistant:unused_by_nt/2000/xp:1000:513:Remote Desktop Help Assistant Account,U-INITSIX-INITZERHelpAssistant,S-1-5-21-861567501-1202660629-839522115-1000:/home/HelpAssistant:/bin/bash
SUPPORT_388945a0:unused_by_nt/2000/xp:1002:513:CN=Microsoft Corporation,L=Redmond,S=Washington,C=US,U-INITSIX-INITZERSUPPORT_388945a0,S-1-5-21-861567501-1202660629-839522115-1002:/home/SUPPORT_388945a0:/bin/bash

Then change the path of home directory under your username.  Save and exit. Then your done.