Your computer name is a label that identifies your device on a network
Your computer name (also called a hostname or device name) is a text label that Windows, Mac, or Linux assigns to your machine. It's what appears when you connect to a network, share files with other computers, or set up printers and devices. You may need it to troubleshoot network problems, connect to a work domain, or help a tech support person identify your specific machine.
The process differs slightly between Windows and Mac, but both take less than a minute. You don't need administrator permission on most systems, though some workplace computers restrict where you can look.
Key Takeaways
- On Windows 10 or 11, open Settings, go to System, then About to see your device name listed under "Device name".
- On Mac, open System Settings (or System Preferences on older versions), click General, then About to find the "Computer Name" field.
- On Windows, you can also right-click This PC or My Computer, select Properties, and look for the computer name under the device section.
- If you need to change your computer name, the same settings pages let you rename it, though you may need to restart your device afterward.
- On a network, your computer name helps other devices find and communicate with yours, so changing it may affect shared printers or file access until other computers refresh their connection.
Finding your computer name on Windows 10 and 11
The quickest route is through Settings. Press the Windows key on your keyboard, type "Settings," and open the Settings app. Click System in the left sidebar, then scroll down and click About. Look for the field labeled "Device name" — that is your computer name.
If you prefer the older method, right-click the Start button, select System, and you will see the same information. On some older Windows versions, you can also right-click This PC (or My Computer) on the desktop, select Properties, and find the computer name under the "Computer name, domain, and workgroup settings" section.
Finding your computer name on Mac
Click the Apple menu in the top-left corner and select System Settings (on newer Macs) or System Preferences (on older versions). In System Settings, click General in the sidebar, then click About. The field labeled "Computer Name" shows your device name.
You can also open Terminal (found in Applications > Utilities) and type the command hostname, then press Enter. The name that appears is your computer name. This method works on any Mac and is often faster if you are already comfortable with Terminal.
Finding your computer name on Linux
Open a terminal window and type hostname, then press Enter. Your computer name will display on the next line. This works on any Linux distribution — Ubuntu, Fedora, Debian, and others all use the same command.
If you want to see more detail, type hostnamectl instead. This shows your static hostname, the transient hostname (used during the current session), and the pretty hostname (a human-readable version). Most of the time, the static hostname is what you need.
Why you might need your computer name
Network printers and shared devices often ask for your computer name when you set them up. If a tech support person is helping you troubleshoot, they may ask for it to identify your machine in a system. Some workplace networks require you to know your computer name to connect to a domain or access shared folders.
If you are setting up file sharing between your computer and another device on the same network, both machines need to know each other's names. Changing your computer name can temporarily break these connections until the other devices refresh their list of available computers.
Changing your computer name if needed
On Windows, go back to Settings > System > About and click the Rename this PC button. Type the new name (letters, numbers, and hyphens only — no spaces or special characters) and click Next. Windows will ask you to restart your computer to explore the change.
On Mac, go to System Settings > General > About and click the Edit button next to "Computer Name." Type the new name and click Done. The change takes effect when ready on most networks, though some devices may take a few minutes to recognize the new name.
On Linux, you will need administrator (sudo) permission to change the hostname permanently. Open Terminal and type sudo hostnamectl set-hostname new-name, replacing "new-name" with what you want. You may need to restart or log out and back in for the change to take full effect.
Troubleshooting if you cannot find your computer name
If the name field appears blank or shows only a string of numbers, your computer may not have been assigned a proper name during setup. This is rare but can happen on fresh installations or devices that were reset. You can assign a name yourself using the rename steps above — choose something straightforward and descriptive, like "living-room-laptop" or "office-desktop."
If you are on a work or school network, your computer name may have been set by your IT department and you may not have permission to change it. If you need to change it, contact your IT support team. On personal networks, you have full control and can rename your device whenever you want.
Frequently Asked Questions
Is my computer name the same as my username?
No. Your username is the account you log into; your computer name is the label for the entire machine. One computer can have multiple user accounts, but it has only one computer name. You can find your username by looking at the account name in Settings or System Preferences.
Can I use spaces or special characters in my computer name?
Windows and Mac allow spaces and some special characters, but it can cause problems on networks. Linux does not allow spaces at all. To avoid compatibility issues, stick to letters, numbers, and hyphens. A name like "home-office-pc" works everywhere; "home office pc!" may cause connection problems.
What happens if two computers on the same network have the same name?
The network will become confused about which device is which, and file sharing or printer connections may fail. If this happens, rename one of the computers following the steps above. The change takes effect when ready on most networks.
Do I need to restart my computer after changing its name?
Windows requires a restart. Mac and Linux usually do not, though some network services may not recognize the new name until you restart or log out and back in. If you are not sure, restarting is the safest option.
Where can I find my computer name if I forgot it?
Follow the steps for your operating system in the sections above — Settings > System > About on Windows, System Settings > General > About on Mac, or the hostname command on Linux. The name is always visible in these locations.