Mac OS X: Terminal Prompt Username

Be brave. This is not a big deal. I'll simplify the article from Apple Support, which is wordy and long and documents every button push.

Summary

  1. Rename the home folder.
  2. Update the Account with the new user and home folder names in System Preferences.

Details

Since you're changing system-level info, you need to have admin privileges. Create a new admin account and log in to it. Use a third name, different than the old and new names that you're changing. It's a good idea to have an extra separate admin account anyway.

  1. Rename the home folder.

    • In Terminal issue this command and type your admin password if/when prompted:

      sudo mv /Users/old_name /Users/new_name
      
    • You can verify success by listing the contents of the new folder and seeing your files there.

      ls /Users/new_name
      
  2. Update the OS X account to match the newly renamed home folder in the OS X Preferences.

    • Go to Preferences -> Accounts and click the lock icon to administer Accounts.

    • On the account you want to rename, control-click and choose advanced options.

    • Change the Account Name and Home Directory fields to the new desired values.