Change the Name of Your Home Folder in macOS


It might seem like the name of your Mac’s home folder can’t be changed.. However, it is completely possible to do so, and you don’t even need to use Terminal. It’s not exactly easy to change the home folder name, and you can run in to some odd problems, so don’t do it without some consideration.

Before you do any of this, it is critical that you make a backup on your system. While this process should be painless, “should” is no guarantee. Also be sure to turn off iCloud Documents and Desktop if you have that feature enabled—iCloud doesn’t cope well with home folder changes. You might also want to disable other syncing services like Dropbox temporarily, or even uninstall them completely. We’ll go over Dropbox fixes later, but you can save yourself the trouble by uninstalling and reinstalling the software.

Before we can change the name of our current account, we’ll need a second administrator account on our machine. If you already have one, you can skip this section.

1. Open “Users & Groups” in System Preferences.

change home folder name

2. Click the lock in the lower left to unlock the preference pane and enter your password.

change home folder name

3. Click the plus button under the list of existing users to create a new user.

change home folder name

4. In the resulting dialog box, click the drop down that says “Standard” and change it to “Administrator.”

change home folder name

5. Enter a name for the user account. We can delete this when we’re done, so don’t worry if it’s a good name or not.

change home folder name

6. Click the Create User button when you’re done.

Now that we have a second admin account, we’ll need to log out of the account with the home folder we want to change and log into the new account.

1. Log out of the current user’s account under the Apple menu.

change home folder name

2. Log into your admin user. If you get prompted to log into your iCloud account, don’t do that.

change home folder name

3. Open Finder, navigate to the /Users/ directory, and locate the folder you want to modify.

change home folder name

4. Rename the folder just like you normally would. Enter the user name and password for your current admin account when prompted.

change home folder name

5. Open the “Users & Groups” preference pane again.

change home folder name

6. Right-click on the name of your main account (whose home folder you just changed) in the sidebar and choose “Advanced Options.”

change home folder name

7. In the resulting pane you’ll need to change two things: the account name and the home directory. Optionally, you can also change the full name (I did), but it’s not strictly necessary. Type your new user name into the account name and full name fields. The account name should be exactly the same as the home folder’s name. Then click the “Choose…” button to select your renamed home folder.

change home folder name

9. Click OK and quit System Preferences.

10. Log out of your administrator account and back in to your main account.

11. Optionally, delete the admin user you created. Select the admin account in the Users & Groups pane and click the minus icon under the list of users. Make sure to select “Delete the home folder” when you do. Then, click Delete User.

change home folder name

Changing the name of your home folder typically breaks something. That’s why we don’t do it too frequently. A lot of programs rely on the name of your home folder, including macOS itself. In testing, this process nuked almost all of my OS preferences. Dock settings, login items, keyboard shortcuts, iCloud – all of it was gone. I had to manually reset everything.

Things outside the OS can break too. Some programs on your computer specify the location of resources by using the full file path. Most of the time reinstalling the program will fix this issue. That’s what I had to do with my Adobe software.

Dropbox is a great example of a program that requires a little more cajoling. If the name of your home folder changes, Dropbox will complain when launched.

change home folder name

The dialog box makes it sound like a permissions problem, and Dropbox will request your username and password to fix it. However, that’s not actually the issue. The real problem is that the folder Dropbox is looking for no longer exists.

change home folder name

Here’s the fix for this particular problem.

1. Download the most recent Dropbox installer.

2. Open Terminal. If you’re not familiar with it, you can find it under /Applications/Utilities/Terminal.app or by typing “Terminal” into Spotlight.

3. Type the following commands into Terminal. Enter them one at a time, and press Enter after each one. Copy and paste to avoid typos. You’ll have to enter your password after the first command.

sudo chown "$USER" "$HOME"
sudo chown -R "$USER" ~/Dropbox
sudo chmod -R u+rw ~/Dropbox
sudo mv ~/.dropbox ~/.Trash/dropbox.old
sudo mv ~/.dropbox-master ~/.Trash/dropbox-master.old
sudo chmod -N ~
sudo mv /Library/DropboxHelperTools ~/DropboxHelperTools.old

If you’re curious, these commands reset some permissions and trash some Dropbox setup files that refer to your old home directory.

4. Reinstall Dropbox from the .dmg you downloaded earlier.

It’s easy to change the name of your home directory, but think twice before you do it. It might require several hours of fixing broken programs once you’re done.

You might also like:

Transfer User Preferences and Data to a New Mac without Time Machine

The Best Mac Backup Strategies You Should Use Today


Alexander Fox

0 Comments

Your email address will not be published.