First rename the home folder

Open the Users folder on the startup disk. It contains the home folder for each user. To get there, you can choose Go > Go to Folder from the menu bar, then enter /Users.

Rename the user's home folder without using any spaces in the new name. You'll be prompted to enter the administrator name and password that you used to log in. If you're using file sharing to share the home folder, you won't be able to rename it until you stop sharing the folder.

Then rename the account

While still logged out of the account you're renaming, follow these additional steps:

Click , then enter the administrator name and password that you used to log in.

From the list of users on the left, Control-click the user you're renaming, then choose Advanced Options.

Change the “Account name” field to match the new name of the home folder. It should have no spaces.

The account name also appears in the “Home directory” field, after /Users/. Change that account name to match the new name of the home folder.

If you want to change the full name associated with your account, update the ”Full name” field as well. It can be any name, and you can use either the full name or the account name to log in to your Mac or make changes that require your name and password.

Click OK, then 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.