04
Sep
How to change the name of your macOS user account and home folder
in Mac
Comments
Your user account name and home folder name were created when you set up your macOS user account. You can rename them.
Each user account on your Mac has a full name and a short name (account name). You can view these names in the Users & Groups pane of System Preferences, and you can use either the full name or short name to log in to your Mac.
Change the full name of a user account
A user’s full name can be changed by that user or an administrator account. The full name doesn’t need to be the same as the account name or home folder name.
macOS Sierra, El Capitan, Yosemite
- Choose Apple menu () > System Preferences, then click Users & Groups.
- Click , then enter an administrator name and password.
- From the list of users, Control-click or right-click the user that you want to rename. Choose Advanced Options from the shortcut menu.
- Change the name in the “Full name” field, then click OK.
OS X Mavericks or earlier
- Choose Apple menu > System Preferences, then click Users & Groups (or Accounts).
- Select a user from the list.
- Change the name in the “Full name” field.
Change the account name and home folder name
Because the account name (short name) is used to create a user’s home folder, the name of the account name and the name of the home folder must match. Before following these steps, you should back up your important data.
macOS Sierra, El Capitan, Yosemite, Mavericks, Mountain Lion, Lion
- Log out of the account you’re renaming, then log in to an administrator account.
The administrator account needs to be a different account than the one you’re renaming. If necessary, create another administrator account, then remove it when you’re done. - Go to the Users folder on the startup drive. The Users folder contains the home folder of the account you’re renaming. Rename that account’s home folder and make note of both the old name and new name. When renaming the folder, you’re prompted to enter the administrator name and password that you used to log in.
- Choose Apple menu > System Preferences, then click Users & Groups.
- Click , then enter the administrator name and password that you used to log in.
- From the list of users, Control-click or right-click the user that you want to rename. Choose Advanced Options from the shortcut menu.
- Change the “Account name” field to match the new name that you gave the home folder in the Users folder.
When modifying the account name (short name) or home folder name, it should not contain any spaces. If the current account name already contains a space, you won’t be able to edit this field until the space has been removed. Click immediately after the space, or use the left arrow key to move the text insertion point immediately after the space, then press the Delete key to remove the space. - Change the “Home directory” field to match the new name that you gave the home folder in the Users folder.
- Click OK, then quit System Preferences.
- Restart your Mac.
- Log in to the renamed account, then verify that your old files and folders are visible and the account is working as expected.
OS X Snow Leopard
- Log out of the account you’re renaming, then log in to an administrator account.
The administrator account needs to be a different account than the one you’re renaming. If necessary, create another administrator account, then remove it when you’re done. - Make note of the current name of the account you’re renaming. It should match the name of that account’s home folder, which is in Users folder of the startup drive.
- Open the Terminal app, which is in the Utilities folder of the Applications folder.
- Enter the following command in Terminal:
sudo mv /Users/oldname /Users/newname
Replace oldname with the original name of the user account, and replace newname with the name you want to change it to. For example, if the old user had the short name “johnappleseed,” and the new user will have the short name “john,” you would enter:sudo mv /Users/johnappleseed /Users/john
- Enter the current account’s administrator password when prompted, then press Return.
- Choose Apple menu > System Preferences, then click Users & Groups, then click Accounts.
- Click , then enter the administrator name and password that you used to log in.
- From the list of accounts, Control-click the account that you want to rename, then choose Advanced Options from the shortcut menu.
- Change the “Account name” field to match the new name. In the example above, you’d change it from “johnappleseed” to “john”.
- Change the “Home directory” field to match the new name. In the example above, you’d change it from “/Users/johnappleseed” to “/Users/john”.
- Click OK, then quit System Preferences.
- Restart your Mac.
- Log in to the renamed account, then verify that your old files and folders are visible and the account is working as expected.
Source: Apple Support