The two ways to change your Windows 11 username
Windows 11 lets you change your username through Settings, which works for most people and takes about five minutes. There is also a command-line method for advanced users or when Settings does not show the option you need. Both methods change the name that appears on your sign-in screen and in File Explorer, though the Settings route is simpler and does not require administrator commands.
The method you choose depends on what kind of account you have. If you sign in with a Microsoft account (the kind linked to Outlook, Hotmail, or a Microsoft password), you can change your display name through Settings. If you use a local account (one that exists only on your computer), you can also change it through Settings. The command-line method works for both, but most people will not need it.
Key Takeaways
- Open Settings, go to Accounts, then Your info, and click the pencil icon next to your name to edit it directly.
- The Settings method works for both Microsoft accounts and local accounts and takes less than five minutes.
- Changes appear when ready on your sign-in screen and throughout Windows, though some programs may still show your old name until you restart them.
- If Settings does not show an edit option, you can use the command prompt method, which requires right-clicking Command Prompt and selecting Run as administrator.
- Your old username remains as your folder name in C:\Users, so file paths do not break when you change your display name.
Changing your username through Settings
Open Settings by pressing Windows key + I, or click the Start button, then Settings. On the left side, click Accounts. Then click Your info at the top of the list on the right side. You will see your current name displayed with a pencil icon next to it.
Click the pencil icon. A text box will appear with your current name highlighted. Delete the old name and type your new one. Click Next, then Finish. Windows will save the change when ready, and your new name will appear on your sign-in screen the next time you restart your computer. You do not need to restart to see the change in Settings or File Explorer, but some programs may still show your old name until you close and reopen them.
If you do not see a pencil icon next to your name, your account may have restrictions that prevent editing through Settings. In that case, skip to the command prompt method below.
What changes and what stays the same
Your display name changes everywhere Windows shows it: your sign-in screen, the Start menu, Settings, and the top-right corner of your screen. File Explorer will show your new name in most places, and any new files or folders you create will show your new name as the owner.
Your user folder in C:\Users keeps its original name. If your old username was JohnSmith and you change it to John, your files still live in C:\Users\JohnSmith. This is intentional — Windows does this so that file paths, shortcuts, and program settings do not break. You will not see this folder name in everyday use, but it matters if you are troubleshooting or moving files around.
Some programs store your name in their own settings or databases. Microsoft Office, for example, may still show your old name in document properties or comments until you update it in each program's settings. Restarting the program usually makes it pick up your new Windows name, but not always.
Using Command Prompt if Settings does not work
If the pencil icon does not appear in Settings, or if you need to change your username for a local account that Settings will not let you edit, you can use Command Prompt. Right-click the Start button and select Terminal (Admin) or Command Prompt (Admin), depending on your Windows version. If you see a User Account Control prompt asking for permission, click Yes.
Type this command exactly as shown, replacing NewUsername with the name you want:
net user OldUsername NewUsername
Replace OldUsername with your current username (the one that appears when you type whoami and press Enter). Press Enter. Windows will confirm the change with a message saying "The command completed successfully." Close Command Prompt and restart your computer. Your new username will appear on your sign-in screen.
If you get an error saying "The system cannot find the file specified," check that you typed your old username correctly. Type whoami and press Enter to see exactly what Windows calls your account, then try the command again.
Changing your Microsoft account display name instead
If you sign in with a Microsoft account, you have a second option: change your display name on Microsoft's website instead of in Windows. This changes how your name appears in Outlook, OneDrive, and other Microsoft services, and it will also update in Windows.
Go to account.microsoft.com, sign in, and click Your info. Click Edit name, change it, and save. The change may take a few minutes to appear in Windows. This method is useful if you want your name to match across all Microsoft services, but the Settings method in Windows is faster if you only care about your computer.
Troubleshooting username changes that do not work
If you changed your username but it still shows the old name in some places, restart your computer. Windows caches your name in memory, and a restart forces it to reload from your account settings. Close any open programs first, because some programs read your username when they start and do not check again while they are running.
If Command Prompt gave you an error about permissions, make sure you right-clicked and selected Run as administrator. Standard Command Prompt windows cannot change usernames. If you still get an error, your account may have restrictions set by a network administrator or parental controls. Contact whoever manages your computer's security settings.
If you changed your username and now cannot sign in, restart your computer and try signing in with your new username. If that does not work, restart again and try your old username — sometimes Windows takes a moment to update. If neither works, you may need to restart in Safe Mode and check your account settings there.
Frequently Asked Questions
Will changing my username affect my files or programs?
Your files stay in the same place and remain yours. Programs will continue to work normally. Some programs may show your old name in their own settings until you restart them or update those settings manually, but nothing will break or disappear.
Can I change my username back to what it was before?
Yes. Use the same method — either the pencil icon in Settings or the Command Prompt command — and type your old username. Windows treats it like any other username change.
What if I forgot my old username?
Open Command Prompt as administrator and type whoami, then press Enter. Windows will display your current username. Use that name in the Command Prompt change command if you need to modify it.
Does changing my username change my password?
No. Your password stays the same. You sign in with your password regardless of what your display name is. If you want to change your password, that is a separate process in Settings under Accounts, then Password.
Will my email or Microsoft account change if I change my Windows username?
No. Your Windows username and your Microsoft account email are separate. Changing your Windows username does not affect your email address or your ability to sign in to Microsoft services. If you want to change how your name appears in Microsoft services, you do that on account.microsoft.com.