How to Change Username on Mac
You can only change username after changing the name of home folder
Steps:
Step 1. If have another administrator account, log out of the account you want to change the name for. If you do not have another administrator account, follow these steps:
a. Menu(Apple symbol) → System preferences → Users & Groups
b. Click on lock button and unlock
c. Click on + sign and choose administrator and give name
d. Logout of current account and into another account
Step 2. After logging into account2 (admin account 2), go to Users folder
To go to folder : Command(⌘) + Spacebar → type Users → go to folder
Step 3. Rename the home folder (the folder you want to change) without spaces
Allow change by entering password
Step 4. Go to apple → System preferences → Users & groups (as before)
Step 5. Command(⌘) + click on the account you want to rename → Advanced options
Step 6. Change account name without spaces
Change same name in home directory
Step 7. Change full name if wanted
Step 8. Click OK
Step 9. Restart Mac
Step 10.Login and verify if changes are done safely