Carnegie Mellon University School of Computer Science

Find a Computer's Hostname

How to determine your computer's hostname and hardware (MAC) address

In a network environment, nodes (network enabled equipment or objects on the network) have unique identifiers. The MAC address is the physical address of a network interface. It is unique at the hardware manufacturer level and SCS Computing Facilities utilizes these hardware addresses to uniquely allow access to our network. 

Physical Address: Refers to the physical address of the Ethernet connection to your computer or server. This may also be referred to as your MAC (Media Access Control) Address, Host ID or Server ID. It is twelve characters long and is a combination of numbers (0–9) and letters (A–F, a–f). Your physical address is often presented in this format: XX-XX-XX-XX-XX-XX.

Each computer that has an IP address assigned on our network must also posses a hostname (also known as a Computer Name). There must not be to identical computer names within the same network. 

Note: Windows does not permit computer names that exceed 15 characters, and you cannot specify a DNS host name that differs from the NETBIOS host name

Host Name: The unique identifier that serves as name of your computer or server can be as long as 255 characters and consists of numbers and letters.

Below you will find the steps to identifying the hostname of your SCS computer. 

Finding the hostname in Windows

Step 1: Click Start, search for cmd. Right click and select run as administrator. If prompted, confirm yes.

Screenshot of Start Menu, search for CMD, right click

Note: If you do not have access to the Command Prompt, please contact your IT department or someone with administrative rights to your machine to help you locate the information.
Step 2: In the command prompt, type: ipconfig /all (then hit enter/return)
Your Host Name will appear at the top, under the section Windows IP Configuration.
C:\WINDOWS\system32>ipconfig /all

Windows IP Configuration

Host Name . . . . . . . . . . . . : hostname
Primary Dns Suffix . . . . . . . :
Node Type . . . . . . . . . . . . : Peer-Peer
IP Routing Enabled. . . . . . . . : No
WINS Proxy Enabled. . . . . . . . : No
DNS Suffix Search List. . . . . . :

Find the hardware address in Windows

  1. Press the Start button, type cmd, then press Enter to start up a command shell
  2. Type ipconfig /all
  3. The hardware address will be listed under "Physical Address"

Finding the hostname in Linux

Step 1: Open the terminal (in Ubuntu, you can search for terminal).

Step 2: In the terminal, type: hostname (then hit enter/return)
terminal window with hostname command
userid ~ $ hostname

Find the hardware address in Linux

  1. Run /sbin/ifconfig -a
  2. The hardware address for each Ethernet interface will be listed in the output after the string "HWaddr".

Find the hostname in macOS

  1. Open the terminal (in macOS, you can search for terminal via spotlight).
  2. In the terminal, type: hostname (then hit enter/return)

Find the Computer Name in macOS

  1. Select "System Preferences" from the Apple Menu.
  2. Select System Preferences
  3. In System Preferences, open Sharing.
  4. View the Computer Name field to confirm.

Find the hardware address in macOS

  1. Select "System Preferences" from the Apple Menu.
  2. Select Network
  3. Select your Ethernet adapter from the menu on the left
  4. Click the Advanced button
  5. Click the Hardware tab
  6. The hardware (MAC) address will be shown below.