A Host ID is a specific piece of information which uniquely identifies a computer. Host IDs are used to generate MATLAB license files, which are machine-specific. Most of the time, the host ID is the lowest-enumerated MAC address of the computer. However, there are exceptions to this:
- With an individual license on a Windows machine, the Volume Serial Number of the C: drive can be used as the host ID.
- With network licenses, the IP address can be used as the host ID. This is not recommended, as IP addresses can change due to external factors. If you are trying to use an IP address as your Host ID on Windows, please review this article here if you are running into issues.
To find your Host ID, follow the instructions below for your operating system.
For Individual and Designated Computer licenses, the Host ID can be either the Volume Serial Number of the C: drive, or the MAC address of the network adapter.
To obtain the volume serial number, open a Windows command prompt and run the following command:
The Volume Serial Number is the value listed at the end of the second line of output (e.g. "Volume Serial Number is 1234-ABCD")
For Network Concurrent or Network Named User licenses, the MAC address must be used as the Host ID. Additionally, computers with a B: drive must use the MAC address as the host ID.
To obtain the MAC address, open a Windows command prompt and run the following command:
If this produces multiple MAC addresses, use the one at the top of the list.
For MacOS, the Host ID is the MAC address of the en0 device.
To obtain the MAC address of the en0 device, start by opening a Terminal window:
- Open Finder
- Open the "Applications" folder
- Open the "Utilities" folder
- Start the "Terminal" application
In the Terminal window, enter the following command:
ifconfig en0 | grep ether
The MAC address is the value listed next to "ether".
With R2014a and later, any MAC address can serve as the host ID regardless of the interface name. If the interfaces are enumerated, use the lowest-enumerated interface.
To obtain the MAC address using a bash shell, run the following command:
Where <interfaceName> is the name of the network interface. For example, eno1, eth0, wlan0, or enp5s0 are common Linux network interface names, although this will vary from computer to computer.
You can also run the following command if you don't have net-tools installed:
For R2013b and earlier, the Host ID is the MAC address of the eth0 or en0 interface.
To obtain the MAC Address using a bash shell, run the following command:
The MAC Address is usually the value listed next to "HWaddr". If your Linux distribution does not have network interfaces which follow the enX or ethX naming scheme, you will either need to update to MATLAB R2014a or later, or change the name of your interfaces so MATLAB can detect them. Consult your distribution's documentation for instructions on changing the network interface naming scheme.