What your machine name is and why you need it

Your machine name (also called a hostname or computer name) is a label that identifies your device on a network. It's different from your user account name — it's the name of the computer itself. You'll need this name when you're troubleshooting network problems, connecting to shared folders, accessing your computer remotely, or setting up printers and other devices.

The machine name is usually set when you first install your operating system, but you can change it anytime. Finding it takes less than a minute on any system, and the steps differ slightly depending on whether you use Windows, Mac, or Linux.

Key Takeaways

  • Your machine name is the network identifier for your computer, separate from your user account name.
  • In Windows, you can find it in System Settings under "About" or by right-clicking "This PC" and selecting Properties.
  • On a Mac, open System Settings, go to General, then About — the name appears as "Computer Name".
  • In Linux, open a terminal and type hostname to see your machine name instantly.
  • You can change your machine name at any time through the same settings where you find it.

Finding your machine name in Windows 10 and 11

The fastest way is through System Settings. Click the Start button, type "about" into the search box, and select "About your PC." Scroll down until you see "Device name" — that's your machine name. Write it down or take a screenshot if you need it for later.

If you prefer the older method, right-click "This PC" on your desktop or in File Explorer, select Properties, and look for "Computer name" under the Device name section. Both routes show the same information.

If you're on a network and need to see the full network name (which sometimes includes a domain), open Command Prompt by pressing Windows key + R, type cmd, and press Enter. Type hostname and press Enter — the name that appears is what other computers see when you're connected to a network.

Finding your machine name on Mac

Open System Settings (or System Preferences on older versions) and click General in the sidebar. Select "About" and look for "Computer Name" near the top of the window. That's your machine name.

You can also find it in the Finder by clicking the Apple menu, selecting "About This Mac," and looking at the window title — it shows your computer name at the top. If you need the technical hostname instead of the friendly name, open Terminal (search for it in Spotlight), type hostname, and press Enter.

Finding your machine name in Linux

Open a terminal window — the method varies by desktop environment, but usually you can right-click the desktop and select "Open Terminal" or search your applications menu for "Terminal." Type hostname and press Enter. The name that appears is your machine name.

If you want more detail, type hostnamectl and press Enter. This shows your static hostname, pretty hostname (the friendly display name), and chassis type all at once. Most of the time you only need the output from the simple hostname command.

When you need to change your machine name

You might change your machine name to make it easier to identify on a network, to match a naming convention at work, or to replace a default name that came with your system. The process is straightforward but requires a restart on most systems.

In Windows, go back to Settings > System > About and click "Rename this PC." Type the new name (letters, numbers, and hyphens only — no spaces or special characters), click Next, and restart when prompted. In Mac, go to System Settings > General > About and click the "Edit" button next to Computer Name, type the new name, and click OK. Linux users can type sudo hostnamectl set-hostname newname in the terminal, replacing "newname" with your choice, then restart.

Machine names on networks and domains

If your computer is part of a workplace network or domain, your machine name might be different from what you see in your personal settings. Network administrators sometimes assign names that follow a company naming scheme. Ask your IT department if you're unsure which name to use for network tasks.

When connecting to shared folders or printers on a network, use the machine name exactly as it appears in your system settings — capitalization usually doesn't matter, but spelling does. If you can't connect to a network resource, double-check that you're using the correct machine name by following the steps above for your operating system.

Frequently Asked Questions

Is my machine name the same as my username?

No. Your username is the account you log into on your computer. Your machine name is the name of the computer itself. You can have multiple user accounts on one machine, but the machine name stays the same for all of them.

Can I use spaces or special characters in my machine name?

Most systems don't allow spaces or special characters in machine names. Stick to letters, numbers, and hyphens. If you want a friendly display name with spaces, some systems (like Mac) let you set both a technical hostname and a separate "pretty name" for display.

What happens if two computers on my network have the same machine name?

Network conflicts occur, and devices may not communicate properly. Each computer on a network needs a unique machine name. If you're adding a new computer to an existing network, check what names are already in use before setting yours.

Do I need to restart my computer after changing the machine name?

Yes, on Windows and Mac you must restart for the change to take effect. Linux systems vary — some require a restart, others don't. It's safest to restart regardless of what system you use.

Where do I use my machine name?

You use it when connecting to shared network folders (typing the path like \\machinename\folder), accessing your computer remotely, setting up network printers, or troubleshooting network connectivity issues. Your IT department or network administrator will tell you when you need it.