CNET también está disponible en español.

Ir a español

Don't show this again

Christmas Gift Guide
Computers

Moving your home folder in OS X

In OS X there are some benefits to moving your folder to another hard drive. Here is how to do this, along with some alternative options to consider.

The home folder in OS X is the default location where your account's settings and data are stored. By default your home folder is located in the Users directory at the root of the main boot drive, will be named the same as your account's short username, and will have a house icon when you are logged into your account.

Having the home directory located on the main boot volume is a convenient option for quick and easy setup; however, there may be instances where you would like to have it on a separate partition, or better yet on a secondary hard drive altogether.

  • Managing large files
    If you regularly generate large files that would quickly fill up your hard drive, you might benefit from storing these files on a large secondary drive. While you can keep them in a separate folder, programs using them might cache them, create other temporary files, or organize support files in other locations within your user account and take up space on your hard drive. In this scenario having your user account on its own separate drive might be beneficial.

  • Performance
    The advent of solid-state drive (SSD) devices has really opened up the data throughput bottlenecks that hard drives have imposed on computers; however, you can still increase your system's speed a bit by storing data separately from the drive containing the system software. When applications run, the system will be using the hard drive to store RAM contents as part of virtual memory, which will be using some of the drive's throughput. This use will decrease the performance of the drive when loading data or other items, so spreading this to other drives should make up for any performance hit.

  • Portability
    Storing user accounts on a separate hard drive makes them more portable, so you can preserve your data separately from the operating system installation. With this setup, you can easily format or even partition the boot drive while maintaining your user account, so you can quickly get your account settings back after a quick format if necessary. This by itself is perhaps not necessary given advanced backup tools like Time Machine, but might make sense when coupled with other reasons for managing the account on separate drives.

If you have decided you would like to migrate your home folder to a secondary hard drive, the process is actually quite simple. Your home folder is just a collection of files and folders owned by your user account, which you have complete control over, so to migrate it just follow these steps.

  1. Make sure you have a secondary admin account.
    When adjusting user settings there is always the potential for something to go wrong, so to ensure that you will at least be able to log in, you should create a new admin account, which will allow you to easily revert changes if needed. You can do this in the Users & Groups (or Accounts) system preferences.

  2. Copy the home folder to the location of choice.
    You can place the home folder anywhere on the secondary drive, though I recommend creating a "Users" folder in which to place it. Once you have established where you would like it to go, open the Users directory on your boot drive and copy your home directory to its destination (it may take a long time to copy, depending on the number and size of files in the home folder).

  3. Account advanced options
    In the account's Advanced Options settings, you can click the Choose button to change the home folder to the new location. Screenshot by Topher Kessler
  4. Open your user account settings.
    Go to the Users & Groups (or Accounts) system preferences, and select your username. You may have to authenticate first by clicking the lock at the bottom of the window.

  5. Go to the advanced settings.
    Right-click your username and choose "Advanced Options," which should bring up a window containing a number of details such as the user ID, group, account name, and log-in shell. The window will also contain a warning stating that changes to these settings might damage your account.

  6. Change your home folder directory.
    In this advanced options window, click the Choose button next to the Home Directory field, and then browse to the new location where you copied your home folder. Select the home folder and click Open, and the path to the new folder should now be in the "Home Directory" field.

After you have made these changes, click "OK" and then log out of your account. Then log back in and your account should load from its location on the secondary hard drive. If all goes well then you should see no difference in behavior. However, if something does go awry then you can log in to the secondary administrator account and edit your account in the same way to revert the home directory back to its original default location.

After logging in to your account successfully, you can then go back to the Users directory on your boot drive and remove the old home folder in there if you would like.

Aliases in home folder
Instead of moving your entire account folder, you can set up aliases within your home folder directories to point to the external drive, enabling you to quickly access the external drive from your home folder. Screenshot by Topher Kessler

While moving your home folder is easy to do and has its benefits, do keep in mind that there are a few potential drawbacks. For one, secondary drives and volumes are not as protected as your main drive. They can easily be formatted and also set so permissions are ignored, which will allow your home folder to be easily browsed by other accounts on the system and thereby potentially compromise the security of your data on a multiuser setup; however, the impact of this would depend on who you allow access to your computer.

Alternative options
While moving your home folder to a new drive might seem like the only way to quickly access a larger secondary drive through your home directory, there are some alternative setups that will perform the same functions. One easy option is to just mirror the home folder directories (Music, Movies, Documents, and so on) to a directory on the secondary drive, and then create aliases to these folders within the respective folders in your account.

This setup will still use the account's library contents (application preferences and settings) from the main boot drive, while allowing you to easily access the external drive through the aliases so you can store your data and documents. The one drawback to this setup is that some programs will need to be configured to access the external drive instead of the original home folder. For instance, Safari's default downloads folder will need to be changed to point to the secondary drive, and you will need to set the location of your iTunes or iPhoto libraries to point to their locations on the external drive as well, but once these changes are done then everything should work properly.

Do you have a custom or unique home folder setup that has its benefits? If so, let us know about it below in the comments.



Questions? Comments? Have a fix? Post them below or e-mail us!
Be sure to check us out on Twitter and the CNET Mac forums.