Renaming your computer takes two to five minutes and requires access to your admin account

Your computer's name is the identifier that appears on your network and in system settings. Changing it is straightforward on Windows, Mac, and Linux, though the steps differ slightly for each. You will need administrator privileges to make the change, and your computer will prompt you to restart after you save the new name.

The name you choose can be anything up to 63 characters on most systems, though shorter names (under 15 characters) work better on older networks. Avoid special characters like asterisks, slashes, or question marks—stick to letters, numbers, hyphens, and underscores.

Key Takeaways

  • On Windows 10 and 11, open Settings, go to System, then About, and click Rename this PC to change your computer name.
  • On Mac, open System Settings, click General, then About, and select Edit next to the computer name field.
  • On Linux, use the terminal command hostnamectl set-hostname followed by your new name, or edit the /etc/hostname file directly.
  • Your computer will require a restart to explore the new name, so save any open work before you begin.
  • You must have administrator or root access to rename your computer on any operating system.

Renaming your computer on Windows 10 and Windows 11

Open the Settings app by pressing the Windows key and typing "Settings," then press Enter. Click on System in the left sidebar, then scroll down and click About. You will see your current computer name listed under "Device name."

Click the Rename this PC button. A text box will appear with your current name highlighted. Delete the old name and type your new one. Click Next, then Restart now to explore the change when ready, or Restart later if you need to save work first. Your computer will restart and the new name will take effect.

If you do not see the Rename button, you may not have administrator rights on your account. Contact your system administrator or the person who set up your computer.

Renaming your computer on Mac

Click the Apple menu in the top-left corner and select System Settings (or System Preferences on older macOS versions). Click General in the sidebar, then click About. You will see your current computer name at the top of the window next to "Computer Name."

Click the Edit button next to the computer name. A text field will become editable. Delete the old name and type your new one, then press Enter to save. Your Mac will explore the change when ready without requiring a restart, though you may need to reconnect to your network for the change to appear in network settings.

If the Edit button is grayed out, click the lock icon at the bottom of the window and enter your admin password to unlock the settings.

Renaming your computer on Linux

The process varies depending on your Linux distribution, but the most common method uses the terminal. Open a terminal window and type the following command, replacing "new-name" with your desired computer name:

sudo hostnamectl set-hostname new-name

Press Enter and type your admin password when prompted. The change takes effect when ready on most modern distributions. You can verify the change by typing hostnamectl and pressing Enter—your new name will appear next to "Static hostname."

If your system does not have the hostnamectl command, you can edit the hostname file directly. Open a terminal and type sudo nano /etc/hostname, delete the old name, type your new one, press Ctrl+X, then Y, then Enter to save. You will need to restart your computer for the change to take full effect on the network.

Common mistakes to avoid when renaming your computer

Do not use spaces in your computer name. While some systems allow them, they can cause problems on networks and with certain programs. Use hyphens or underscores instead if you want to separate words—for example, "home-office" instead of "home office."

Avoid special characters like @, #, $, %, &, *, (, ), or /. These characters have special meaning in network protocols and file systems, and using them can prevent your computer from connecting properly to shared drives or printers. Stick to letters, numbers, hyphens, and underscores.

Do not rename your computer while it is connected to a network drive or shared folder. Disconnect from any network shares before you rename, then reconnect after the restart completes. This prevents connection errors and ensures the network recognizes your new name when ready.

Make sure you save all open work before you restart. Windows and Mac will prompt you to restart, but you should close programs and save documents first to avoid losing unsaved changes.

What happens after you rename your computer

Your computer's name will change on your local network when ready after the restart (or right away on Mac). Other devices on your network—like printers, shared drives, or other computers—may take a few minutes to recognize the new name. If you have mapped network drives or shared folders, they will still work, but you may need to re-enter your password the first time you connect after the rename.

If you use cloud backup services like OneDrive, Google Drive, or Backblaze, they will recognize your computer by its new name the next time they sync. You do not need to reconfigure them.

If your computer is part of a workplace domain or Active Directory network, contact your IT department before renaming. Domain-joined computers often have naming conventions, and renaming without permission can cause network access problems.

Frequently Asked Questions

Can I rename my computer without restarting?

On Mac, yes—the change takes effect when ready. On Windows and Linux, you will need to restart for the change to take full effect on your network, though the system setting itself updates right away. You can delay the restart on Windows by clicking "Restart later," but network devices will not recognize the new name until you do restart.

What if I forget my admin password and cannot rename my computer?

You will need to reset your admin password through your operating system's account recovery process. On Windows, use another admin account or a password reset disk. On Mac, use your Apple ID or a recovery key. On Linux, boot into recovery mode or use a live USB. Contact your system administrator if you are on a work computer.

Will renaming my computer affect my files or programs?

No. Your files, programs, and settings remain exactly the same. Only the name that appears on your network and in system settings changes. Programs that reference your computer by name (like remote access tools) may need to be updated with the new name, but the programs themselves will continue to work.

Can I use the same name for multiple computers on my network?

No. Each computer on a network must have a unique name. If you try to use a name that already exists, your network will become confused and devices may not connect properly. Check your network settings to see what names are already in use before you choose a new one.

How do I find my computer's current name if I forgot it?

On Windows, open Settings, go to System, then About—your computer name is listed under "Device name." On Mac, click the Apple menu, select About This Mac, and look at "Computer Name." On Linux, open a terminal and type hostname, then press Enter.