What a machine name is and why you need it

Your computer's machine name (also called hostname or computer name) is a unique identifier that distinguishes your device on a network. It's the name other computers use to find and communicate with yours, and it's also what appears in system settings and network listings.

You'll need to know your machine name when you're setting up network printers, connecting to shared folders on other computers, troubleshooting network problems, or configuring remote access. IT support staff often ask for it as a first step in diagnosing issues. The machine name is different from your user account name — your account is who you are, while the machine name is what the computer itself is called.

Key Takeaways

  • Your machine name appears in System Settings on Windows and System Preferences on Mac, and can be found in under one minute without any special tools.
  • On Windows 11 and 10, open Settings, go to System, then About, and look for "Device name" in the middle of the screen.
  • On Mac, open System Settings, click General, then About, and the "Computer Name" field shows your machine name at the top.
  • The quickest method on any computer is to open a terminal or command prompt and type a single command that displays the name instantly.
  • Machine names can contain letters, numbers, and hyphens, but not spaces or special characters, so yours may look different from how you remember naming it.

Finding your machine name on Windows 11 and Windows 10

The easiest way on Windows is through the Settings app. Click the Start button in the bottom left, type "Settings" and press Enter. Once Settings opens, click "System" on the left side, then scroll down and click "About" at the bottom of the list.

Look for the field labeled "Device name" — this is your machine name. It appears near the top of the About page, usually above the processor information. Write it down exactly as it appears, including any numbers or hyphens, since that's how other computers will need to reference it.

If you need to change your machine name, the "Rename this PC" button is on the same About page. Windows will ask you to restart your computer for the change to take effect, so plan accordingly if you're in the middle of work.

Finding your machine name on Mac

On Mac, open System Settings by clicking the Apple menu in the top left corner and selecting "System Settings" (or "System Preferences" on older macOS versions). Click "General" in the left sidebar, then click "About."

The "Computer Name" field appears at the top of the About window. This is your machine name. If you see a longer name with ".local" at the end, that's your full network address — your machine name is just the part before the period.

You can change your machine name from the same About window by clicking the "Edit" button next to the Computer Name field. The change takes effect immediately without requiring a restart.

Using the command line for a faster lookup

If you're comfortable opening a terminal, this method is faster than navigating menus. On Windows, press the Windows key and R together, type "cmd" and press Enter to open Command Prompt. Type the command hostname and press Enter — your machine name appears on the next line.

On Mac, open Terminal (search for it in Spotlight by pressing Command and Space, then type "Terminal"). Type the command hostname and press Enter. The machine name displays immediately.

This method works the same way on both systems and takes about five seconds once the terminal is open. The name displayed is exactly what you need for network connections and support requests.

What to do if your machine name contains unexpected characters

Windows and Mac automatically convert spaces and most special characters in machine names to hyphens or remove them entirely. If you named your computer "John's Laptop" during setup, the actual machine name might be "Johns-Laptop" or "JohnsLaptop" depending on your operating system version.

This matters because you need to use the actual machine name — not what you remember typing — when connecting to network resources. Always copy the exact name from Settings or the terminal output rather than typing it from memory. If the name looks wrong or contains characters you don't recognize, that's normal and expected behavior from the operating system.

Machine names on corporate or managed networks

If your computer is managed by an organization's IT department, your machine name may have been assigned automatically and might follow a naming pattern like "DEPT-WS-001" or "COMPANY-LAPTOP-SMITH." You cannot change it yourself — IT has locked this setting to keep the network organized.

If you need to change your machine name on a corporate network, contact your IT support team. They can change it from their end and push the change to your computer, or they can walk you through the process if your account has permission. Attempting to change it without authorization may cause network connection problems.

Frequently Asked Questions

Is my machine name the same as my username?

No. Your username is the account you log into; your machine name is what the computer itself is called on the network. You might be user "jsmith" on a computer named "OFFICE-DESK-02." Other computers need the machine name to find yours, not your username.

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

The operating system will not allow spaces, and most special characters get converted or removed. Stick to letters, numbers, and hyphens. If you try to create a name with spaces, Windows and Mac will automatically change it to remove them.

What if I see two different names in Settings?

You might see both a "Computer Name" and a "Local Hostname" on Mac, or a "Device name" and a "Full device name" on Windows. The shorter one is your machine name. The longer version with ".local" or domain information is your full network address, but the machine name is what you'll use most often.

Does changing my machine name affect my files or programs?

No. Changing your machine name does not affect any of your files, programs, or settings. It only changes how the computer identifies itself on the network. Any programs you have installed will continue to work normally after the change.

Why would IT support ask for my machine name?

IT uses your machine name to locate your computer on the network, access logs specific to your device, push updates or settings, and troubleshoot connection problems. It's much faster than asking you to describe your computer or trying to identify it by IP address.