Overview
The hostname of a device is the name assigned to a device connected to a network. This article is a guide on how to find the hostname of a MacOS, Windows, or Linux device.
Critical Concepts
- On some devices, the term “computer name” is used interchangeably with “hostname”, but this is not the standard across all devices. Please follow the steps below for your respective operating system to get the device’s “hostname”.
- Viewing the device’s hostname typically does not require administrative privileges, but changing the hostname usually does.
Steps to Take
MacOS
There are 2 methods outlined below for finding the hostname of your MacOS device.
- Method 1:
- Navigate to “System Settings” > “General” > “Sharing”.
- The device’s hostname will be the “Local hostname”.
- Method 2:
- Navigate to “Finder” and click on “Applications” in the sidebar.
- Locate and double-click the “Utilities” folder.
- Locate and double-click on “Terminal”.
- In the Terminal window, type “hostname” and press “ENTER”.
- The device’s hostname will display in the Terminal window. It may have “.local” appended to the end of it.
Windows
There are 2 methods outlined below for finding the hostname of your Windows device.
- Method 1:
- Navigate to “Settings” > “Home”.
- The device's hostname will appear at the top of the page above the device model.
- Method 2:
- Navigate to the “Start” menu and open “Windows PowerShell”.
- In the window that opens, type “hostname” and press “ENTER”.
- The device’s hostname will display in the PowerShell window.
Linux
There is 1 method outlined below for finding the hostname of your Linux device.
- Open a Terminal window. On Ubuntu, this can be found in “Applications” > “Accessories” > “Terminal” (this may vary depending on your Linux distribution).
- Type “hostname” and press “ENTER”.
- The device’s hostname will display in the Terminal window.