How To Move or Rename Your Mac Home Folder [MacRx]

Move Mac Home Folder

Your Mac’s home directory, or home folder, is represented by a little house in the Finder and is the default location for your documents, music, photos and other items on your computer. The name of the home folder is also your Mac account username, or “shortname” in UNIX parlance.

Since these items are related, the process for renaming the home folder and changing your username is similar to moving your home folder to another location such as a second hard drive. Here’s how it’s done.

Renaming Your User Account and Home Folder

The most common reason to rename a home directory and Mac account name is to correct a misspelling or change the name if a new user replaces an old one, such as an employee change in a business. The old or incorrect name has no ill effect on computer operations but can be psychologically annoying when things aren’t correct.

IMPORTANT: this is an advanced procedure that can result in loss of access to your data if done incorrectly. Make sure you read and feel comfortable with these instructions and how to use Terminal before making any changes. Also, BACK UP YOUR DATA before you begin. Time Machine is OK, a Hard Drive Clone is better. Make sure you can revert back to the old system if anything goes wrong.

For this example let’s start with a user named Bob Smith with the username bobsmith. We wish to change this for a new user, Jane Doe, with the username janedoe.

You need to use a second account on the Mac with administrator privileges to make the change. Log out of Bob Smith’s account (under the Apple menu), then log in to the separate admin account and open System Preferences. Choose the Users & Groups preference pane, click the lock to authenticate and enter your admin password.

Next, right-click (or control-click) on Bob Smith’s account in the left hand pane and choose Advanced Options…

2 Advanced Options

This will bring up another window with a warning not to muck with things if you don’t know what you’re doing (always good advice).

3 Old Shortname

Two things need to be changed in this dialog: the entries for Account name and the Home directory. For Account name simply replace bobsmith with janedoe.

4 New Shortname

Next, in the Home directory field change the existing entry as follows:

old: /Users/bobsmith
new: /Users/janedoe

5 New Directory Name

Double-check the entries for spelling and typos, then click OK. Your Mac will ask Are You Sure to confirm you indeed want to make this change, so this is the point of no return.

Finally, back in System Preferences, change the Full name you see in the account pane from Bob Smith to Jane Doe. The Full name is really just an alias to the shortname that’s easier for you and I to remember.

8 Change Fullname

These actions change the Mac user ID record internally for the account. We now need to rename the actual home directory. This step is done with the Terminal application, located inside your Applications –> Utilities folder. Launch Terminal, then type the following at the command prompt:

sudo mv /Users/bobsmith /Users/janedoe

Terminal mv

Make sure you type the old and new usernames correctly, then hit Return. You will be prompted to enter your admin account password. Type that in – the letters won’t show onscreen – then hit Return again. This command moves (mv) the entire folder from the old location to the new one, which in this case is effectively just a rename operation. Since the move is “in-place” on the same hard drive the process should only take a few seconds, then a new blank command line will appear.

When finished quit Terminal and System Preferences, then reboot your Mac. Upon restart the account name and home directory will both have been renamed to janedoe.

Moving Your Home Folder to a Different Drive

Sometimes you’re not looking to rename an account but actually move the home directory to a separate drive or partition. This is a common setup for servers and can also be used on any system where you want to keep things separate, such as having the Operating System and Applications on a Solid State Drive and the user data on a larger (but slower) hard disk drive.

The process is similar to renaming a home folder, but in this case we’re keeping the same username and changing the location. As above, log out of the account to be changed and log in to a second admin account. Open System Preferences –> Users & Groups, right-click on the account to be changed and choose Advanced Options…

In the Advanced dialog box leave the account name as is (bobsmith) but change the location of the Home directory. Let’s say we want to move the home directory to a hard drive named Employees. Using the Finder create a folder named Users on the Employees drive. Then, change the Home directory entry as follows:

old: /Users/bobsmith
new: /Volumes/Employees/Users/bobsmith

9 Move Home Folder

Correct entry and spelling of this data is critical. Verify there are no typos, then click OK to save these changes.

Terminal is your next step, and this time the files will actually be moved between the two hard drives. Open Terminal and at the command prompt type:

sudo mv /Users/bobsmith /Volumes/Employees/Users/bobsmith

Terminal mv 2

Enter your admin account password when prompted, then hit Return. This operation may take some time depending on how much data has to be moved, do not interrupt the process or use the Mac for other tasks while this is happening. When the copy is complete you will see a new command line prompt appear in the Terminal window.

Verify that the folder has actually moved to the new drive, then restart the Mac and you should be good to go. Note that the second drive should be a Mac-formatted volume, and if it’s not an internal disk it will need to be connected and powered up whenever you’re using the Mac for the home directory to be accessible.

Changing the Account Name on Pre-Leopard Systems

The above steps are common procedures for UNIX-based systems but are made simpler by Apple’s inclusion of the Advanced Options dialog for changing account names. The process is a bit more complex for pre-Leopard Macs, but if you’re running Tiger (OS X 10.4.x) or Panther (10.3.x) on your Mac there’s a handy utility available which can automate the name changing for you.

ChangeShortName is a freeware utility by Dan Frakes which automates changing the username via a series of pre-configured terminal scripts. As above, log out of the user account to be changed and make changes from a second admin account on the Mac. ChangeShortName will prompt for the old and new names, make the necessary changes, then prompt you to reboot your machine.

Note that this utility will not work with OS X 10.5.x or higher. If your Mac is running something even older than Panther, frankly it’s time to upgrade to something newer! Very little current software runs under these older OS versions, time and energy is better spent migrating to a newer system.

Related
  • Christopher Cobble

    “Note that this utility will not work with OS X 10.5.x or higher” and “If your Mac is running something even older than Panther, frankly it’s time to upgrade to something newer!”? I’d agree with the second part, but that really only gives a pretty small window of having Tiger. Maybe you meant it works ONLY with 10.5 and up?

  • Adam Rosen

    ChangeShortName works with Panther and Tiger, it won’t work with Leopard or newer systems.  For Leopard, Snow Leopard or Lion use the Preference Pane and Terminal method described above.

  • prof_peabody

    I can’t believe you wrote a whole article on this without clearly explaining the dangers.  

    The reason for the warnings you get, is that previous to Leopard, following this advice would wipe your entire system and all your data.  

    I can’t tell you how many times I’ve had to explain to crying people that simply changing the short name off their user account is the reason all their stuff was instantly deleted and that there’s no way to get it back.  

    Sure you tell people to back up.  Sure, if they follow all your advice to the letter they probably will be fine, but there is a potentially HUGE downside to this trivial act of changing the name.  The user could literally lose everything if they do even one part of this wrong and for what?  The spelling of a name that you don’t even see most of the time?  

    The user sees the *long* name most everywhere, that’s the point of the long and short names. 

  • Chris

    thanks for this tip! I was just thinking about how to do this when I get a new MBP and replace the SuperDrive with a Hardrive

  • Ms Christyleonard

    Fire your Photoshop guy.

  • Josephine

    followed directions, wiped out everything, computer running very slow now and i cannot even get into system prefs… i like you guys, usually you have great info, not this time. thanks a lot 

  • Adam Rosen

    Hey “Prof” – I’ve done this procedure dozens of times exactly as described.  When executed correctly it works fine.  If you don’t know what you’re doing or aren’t comfortable working in Terminal, you shouldn’t be making these changes.  And as noted, always start with a backup.

    Data isn’t wiped out if you use the wrong name in the “mv” command, it’s just placed in a different directory. The “rm” command erases data, the “mv” command is for moving or renaming.

    You’re very quick to judge and criticize, BTW – can you please share your technical expertise with the group?  All I ever see from you on this site are complaints and negative opinions…

  • Adam Rosen

    I’m sorry you’re having problems.  Did you start with a backup of your data?  Did you use a second admin account to make the changes, or did you make changes from within the existing account?  As noted above you have to make the changes from a second account while you are not logged in to the first account.

  • Josephine

    i have a back up, kind of, all my files are backed up in different places. i used a 2nd admin account, i can see all of my ‘old’ files they just won’t open, keeps telling me i have no permission, ran a disk utility first aid made no difference. really frustrating since i can’t even get into system preferences to log into things

  • Adam Rosen

    Please send me your email address and I will followup with you later today.

  • Josephine

    thanks, I’m looking everywhere and trying everything i can to get my permissions back josephine8 at me dot com

  • CharliK

    Much easier way to do this.

    Backup the home folder to an external drive. Change name of folder on external to new name.

    On computer, go to Users folder and drag folder back over. It will make you authenticate. When the copy is finished, go into system prefs and create a new user account with he same short name as the name of he folder you just moved. It will ask if you want to use existing folder, say yes.

    After you verify all is good, delete the other account if you wish

  • Adam Rosen

    That’s an interesting alternative method, hadn’t known about that.  The downside is you’ll have two copies of your data on the primary drive (old home folder and newly renamed), which could cause space constraints, but better extra data than none at all!

  • Josephine

    Thanks ADAM – got everything fixed and working and the name changed too ;) guess i hit a glitch or something? names changed thats all that counts

  • CharliK

    you can always delete it. technically you can delete it as soon as you copy it but I don’t recommend that unless you have a second copy on another external cause if something went wacky and you didn’t get part of your data you’ll be pissed

  • Jhncito

    I tried this, but the sudo mv command didn’t appear to move anything, no files appeared on my target hard drive.  I have also tried simply dragging the home folder that I wanted to move onto the new dive.  That appeared to work, but when I changed the Home Directory as above, then logged in as the user I just moved, all of the previous settings (such as screen background, etc) were gone.  I was able to un-do everything, but still don’t have the user account moved to the other drive

  • Kitkatkhaw Cy

    It asks me to restart my computer right after the “are you sure” dialog, is that normal?

  • Adam Rosen

    Yes, though you can go ahead and do the mv operation in Terminal first, then Restart.

  • Adam Rosen

    Double-check the name and path of the source and destination folder, you may have had a typo in the mv entry.

  • Joel Joshua Goh

    Omg, I have got the same problem after I changed the name. Please tell me how you fixed it.

  • kaan92

    Hi i seem to have done the same, iv restarted and i have all my old applications, but no pictures, no music, and for some reason when i try to undo the padlock on system preferences it doesn’t recognise my password and under my name it has standard instead of admin, hope you can help.
    Thanks kaan

  • franky

    Sadly i tried ,but when i try to open terminal i have this message “the admintrator has set your shell to an illegal value”
    Help!!

About the author

Adam RosenAdam Rosen is an Apple certified IT consultant specializing in Macintosh systems new and old. He lives in Boston with two cats and too many possessions. In addition to membership in the Cult of Mac, Adam has written for Low End Mac and is curator of the Vintage Mac Museum. He also enjoys a good libation.

(sorry, you need Javascript to see this e-mail address)| Read more posts by .

Posted in How-To, MacRx, Top stories | Tagged: , , , |