How to Check Your Computer Name on Any OS
Every device on a network needs an identity — and that identity is your computer name (also called the hostname). Whether you're connecting to a shared drive, setting up remote access, troubleshooting a network issue, or just trying to keep your devices organized, knowing how to find your computer name is a practical skill that comes up more often than most people expect.
Here's how to check it across every major operating system, plus what factors might affect which method works best for you.
What Is a Computer Name (and Why Does It Matter)?
A computer name is a label assigned to your device that identifies it on a local network or domain. It's different from your username — the computer name identifies the machine itself, not the person using it.
You'll need your computer name when:
- Mapping a network drive to another PC
- Enabling Remote Desktop connections
- Joining a Windows domain or workgroup
- Setting up file or printer sharing
- Running command-line tools like
pingorssh
The name is usually set during initial OS setup, but it can be changed at any time by an admin.
How to Check Your Computer Name on Windows 💻
Windows gives you several paths to the same answer depending on how comfortable you are with the interface.
Method 1: Settings App (Windows 10 and 11)
- Open Settings (Windows key + I)
- Go to System → About
- Look for Device name near the top of the page
This is the quickest route for most users and shows the name exactly as Windows recognizes it on the network.
Method 2: Control Panel
- Open Control Panel
- Go to System and Security → System
- Find Computer name under the "Computer name, domain, and workgroup settings" section
This view also shows your workgroup or domain name, which is useful context if you're on a managed network.
Method 3: Command Prompt or PowerShell
For anyone comfortable with a terminal, this is the fastest method:
hostname Type that single command and press Enter. The computer name prints immediately. This works in both Command Prompt and PowerShell, and it's especially useful if you're already working in a terminal session or checking remotely.
An alternative command that returns more detail:
ipconfig /all Look for the Host Name line near the top of the output.
Method 4: Run Dialog
Press Windows key + R, type sysdm.cpl, and press Enter. The System Properties window opens directly to the Computer Name tab — no clicking through menus required.
How to Check Your Computer Name on macOS 🍎
System Settings / System Preferences
- macOS Ventura and later: Open System Settings → General → Sharing. Your computer name appears at the top.
- macOS Monterey and earlier: Open System Preferences → Sharing. The Computer Name field is at the top of the window.
The name shown here is what other Apple devices see on the local network via Bonjour.
Terminal Method
Open Terminal and run:
hostname Or for the full network hostname:
scutil --get ComputerName macOS actually stores three different name values — ComputerName, LocalHostName, and HostName — which can occasionally differ. The scutil command lets you check each one specifically.
How to Check Your Computer Name on Linux
The method is consistent across most distributions:
Terminal Command
hostname For the fully qualified domain name (FQDN):
hostname -f You can also read the hostname file directly:
cat /etc/hostname On desktop distributions like Ubuntu, the computer name is also visible in Settings → About.
Quick Comparison by OS
| Operating System | Easiest GUI Path | Terminal Command |
|---|---|---|
| Windows 10/11 | Settings → System → About | hostname |
| macOS (Ventura+) | System Settings → General → Sharing | scutil --get ComputerName |
| macOS (older) | System Preferences → Sharing | hostname |
| Ubuntu / Linux | Settings → About | hostname |
| All (terminal) | — | hostname |
Factors That Affect Which Method Is Right for You
Not every method is equally useful in every situation. A few variables worth considering:
Your OS version: The Settings paths on Windows and macOS have shifted with recent updates. Windows 11 reorganized the Settings app compared to Windows 10, and macOS Ventura replaced System Preferences with System Settings. Screenshots or guides written for older versions may send you to menus that no longer exist.
Your access level: On a managed corporate or school device, you may not have admin rights to view certain system panels — but the hostname command in a terminal works regardless of permission level in most cases.
How you're connecting: If you need the computer name for Remote Desktop, you want the exact name as shown in System Properties or the About page. If you're using it for SSH on Linux, the /etc/hostname file is the authoritative source.
Domain vs. workgroup environments: On a Windows domain, the computer name is paired with a domain suffix (e.g., MYPC.company.local). In a home workgroup, just the short name is typically enough. Which format you need depends on what you're connecting to and how your network is configured.
macOS's multiple name values: Apple devices can have slight differences between the display name, local hostname, and network hostname. If device discovery isn't working as expected, it's worth checking all three with scutil rather than assuming the display name is what other devices see.
The method that works cleanly for a home user on a standalone Windows 11 machine looks different from what a Linux sysadmin needs when managing multiple servers — and both differ from what someone troubleshooting an Apple network sharing issue has to sort through.