How to Find Your Computer Name on Any Operating System
Every computer on a network has a name — a human-readable label that distinguishes it from other devices. Whether you're troubleshooting a connection issue, setting up remote access, sharing files across a home network, or simply following IT instructions, knowing how to find your computer name is a practical skill that takes under a minute once you know where to look.
What Is a Computer Name (and Why Does It Matter)?
A computer name (also called a hostname) is a unique identifier assigned to your device on a local network. Unlike an IP address — which is numerical and can change — a computer name is a readable label like DESKTOP-K7TXQ2 or Marias-MacBook-Pro.
Operating systems use hostnames to:
- Identify devices on local networks (home Wi-Fi, office LANs)
- Enable file sharing and printer sharing between machines
- Support remote desktop connections
- Log activity in network administrator tools
Your computer name is set during initial setup and can be changed at any time, though most users never need to modify it.
How to Find Your Computer Name on Windows 🖥️
Windows gives you several ways to locate your hostname, depending on which version you're running and how comfortable you are navigating system menus.
Method 1: Settings App (Windows 10 and 11)
- Open Settings (Windows key + I)
- Go to System
- Select About
- Look for Device name near the top of the page
Method 2: Control Panel
- Open Control Panel
- Navigate to System and Security → System
- Your computer name appears under the Computer name, domain, and workgroup settings section
Method 3: Command Prompt or PowerShell
For users who prefer the command line:
- Open Command Prompt or PowerShell
- Type
hostnameand press Enter - Your computer name displays immediately on the next line
This method works on all modern versions of Windows and is particularly useful for remote sessions or scripting.
Method 4: Run Dialog
- Press Windows key + R
- Type
sysdm.cpland press Enter - The System Properties window opens with your computer name displayed on the first tab
How to Find Your Computer Name on macOS 🍎
On a Mac, the computer name is tied to your device's Sharing settings and also functions as the Bonjour name used on local networks.
Method 1: System Settings / System Preferences
- macOS Ventura and later: Go to Apple menu → System Settings → General → Sharing
- macOS Monterey and earlier: Go to Apple menu → System Preferences → Sharing
Your computer name appears at the top of this panel. You'll also see a Local Hostname listed just below it — this is the .local version used for Bonjour network discovery (e.g., marias-macbook-pro.local).
Method 2: Terminal
Open Terminal and type:
hostname Or for the full network hostname:
scutil --get ComputerName The two commands can return slightly different results. hostname returns the system hostname, while scutil --get ComputerName returns the user-friendly name shown in System Settings.
How to Find Your Computer Name on Linux
Linux distributions vary in how they surface the hostname through a GUI, but the terminal method is consistent across virtually all of them.
Terminal Method
Open a terminal and run:
hostname Or, for more detail including the fully qualified domain name:
hostnamectl The hostnamectl command (available on systemd-based distributions) also shows the static hostname, transient hostname, and pretty hostname — distinctions that matter in managed network environments.
GUI Method (Ubuntu/GNOME example)
- Go to Settings → About
- Your device name is listed near the top
Other desktop environments (KDE Plasma, XFCE, etc.) place this information in their respective About This Computer or System Information panels.
Quick Reference by OS
| Operating System | Fastest Method | Command-Line Option |
|---|---|---|
| Windows 10/11 | Settings → System → About | hostname in CMD/PowerShell |
| macOS (any version) | System Settings → Sharing | scutil --get ComputerName |
| Linux (systemd) | Settings → About | hostnamectl |
| Linux (general) | Varies by desktop | hostname |
Factors That Affect What You See
Finding your computer name sounds straightforward, but a few variables can produce unexpected results:
Domain vs. workgroup environments. On a corporate network where your machine is joined to a Windows domain, your computer name may include a domain suffix (e.g., LAPTOP-04.companyname.local). Home users typically see just the short name.
Multiple hostnames on macOS. Macs maintain a Computer Name (friendly, shown in Finder), a Local Hostname (Bonjour, ends in .local), and a Host Name (used for DNS). They're usually related but not identical, and the one you need depends on what you're trying to do.
User-modified names. If someone has renamed the computer since setup — which is common in shared households or small offices — the name in settings may differ from what's cached in network logs or router tables.
Virtual machines. A VM running inside your computer has its own separate hostname, independent of the host machine's name. If you're working in a virtualized environment, make sure you're checking the right system.
Case sensitivity. On Linux, hostnames are technically case-sensitive. On Windows and macOS, they're treated as case-insensitive for most practical purposes, but the casing shown in settings is what gets broadcast on the network.
Whether you're following a network setup guide, responding to an IT request, or connecting two devices for the first time, the right method depends on your operating system — and, in some cases, exactly what kind of hostname you actually need.