How to Move the Home Folder in OS X – and Why

Someone, who can be identified as Darwin9 in the chat room, sent me a “How to Move the Home Folder in OS X Leopard.” I hadn’t done it yet, but it’s something that I was hoping to do for my next installation.

  1. Click on ‘Macintosh HD’ in the Finder and open the ‘Users’ folder. In here you will find a folder named after your shortname. This is your home folder. As it is currently your active home folder it will have a ‘house’ icon assigned to it. Copy this folder to the 2nd hardrive by simply dragging it (moving files / folders to a 2nd volume in OS X only copies the content, it doesn’t remove it from its original location). Note: The copied folder will not have the ‘house’ icon as it is not yet recognized as you active home folder. We will change this in the following steps.
  2. Open the ‘System Preferences’ application from either the Dock, the Applications folder or from the Apple menu.
  3. Click on the ‘Accounts’ icon in the ‘System’ section.
  4. After entering your password to unlock the padlock, CTL-Click (or right click if you have this enabled for your mouse) on the active admin account (from the list of user accounts in the left pane) to reveal an ‘Advanced Options’ contextual menu. Select this item.
  5. You will be presented with a pane full of advanced settings (and also a warning about how you should only change these settings if you know what you are doing!). Ignore all of these settings except for the ‘Home Directory’ option. This is the path that OS X uses to locate your home folder when you login. It should say: /Users/shortname
  6. Click on the ‘Choose’ button, and browse to the home folder in the new location (this will be the folder you moved in Step 1 which will be named after your shortname). After you select the new location, the ‘Home directory’ path should change to something like: /Volumes/shortname.
  7. OS X will continue to use the original home folder until you restart. So restart the computer and login as normal. To confirm that the new home folder is now active, browse to the folder you copied to the 2nd hardrive and check it has the ‘house’ icon assigned to it. Now that your home folder is successfully located on your 2nd drive, you can delete the original home folder in the Users folder. It should now have a generic folder icon as it is no longer the active home folder.

Why would you bother to move your ‘Home’ folder at all? For the same reason why I recommend you keep your ‘My Documents’ folder on a completely separate hard drive. It’s just easier to manage should something happen to your OS or primary drive. Scott added, in a follow-up email:

Everything will work just the same as normal, it’s all transparent to the user. The only difference will be that all of the stuff inside your home folder (Desktop, Documents, Downloads Pictures, Music, Movies, etc.) will actually be kept on the 2nd drive instead of on the 1st (boot drive).

This is great if you ever have to reinstall OS X, you can erase the 1st boot drive, reinstall OS X, and perform steps 2 – 7 again and you’ll be back up and running with all of your stuff in the home folder untouched! You don’t need to perform step 1 because the home folder is already on the 2nd drive at this point. You will have to install Applications and set Global and System Preferences again though as i will explain below.

All you have to understand is that OS X uses 4 distinct folders: Applications, Library, System and Users. The first 3 all have to remain on the 1st boot drive – Applications and its contents all have their permissions set to allow the System to read and write to them, so this is where you should keep ALL applications.

The Library is where all Admin level files are kept. These are files that effect every user globally like system preferences, and there permissions are set to only allow Admin users access to change things in here.

And the System folder is just that… it’s for the System only and you should very rarely have to change anything in this folder. Even if you try to mess with this folder as an Admin account holder, you will most likely be denied or asked to authenticate, because the System owns most of the files in here.

The 4th folder Users, includes a dedicated folder for each user (named after the shortname) that has been setup in OS X (This is the folder we located to the 2nd drive). All of your user files and folders and kept in here. Everything in this folder has the permissions set to allow only that individual user access to it. So the (User) Library folder in here is very similar to the (Admin) Library mentioned above, except that its contents are specific to only the user in question.

This means preferences that are specific to your personal stuff are kept in here. So things like custom application preferences, email accounts, user installed screen-savers, fonts, plug-ins and codecs, and your Desktop picture, Finder and Dock settings etc.

You could get away with changing the location of your home folder whenever you want probably, not just after the initial install. I warn against it because if something goes wrong it is effortless to start again in the beginning.

But OS X will handle moving your home folder just fine if you follow the steps I gave each time. If your wondering why it doesn’t break links between applications and preferences etc, its because OS X uses Directory Services to keep a central database of all users and the locations of their home folders etc in one place. When applications and preferences try to perform user specific actions, it all flows through Directory Services – So if you keep the database up to date by following the steps I provided, OS X will always know where everything is! 😉