MATLAB Answers

What is a Host ID or Machine ID? How do I find my Host ID (Machine ID) in order to activate or get passcodes for my license?

Asked by MathWorks Support Team on 17 Jul 2013
Latest activity Commented on by Alexander List on 18 Aug 2015

In order to activate or get passcodes for my license, I must provide a Host ID or Machine ID. What is this ID and how do I find this on my machine?


2 Answers

Answer by MathWorks Support Team on 18 Oct 2013
 Accepted answer

When a license file is generated for a specific computer, it is locked to a number that is unique to that machine. For some UNIX machines, the 32-bit hostid is used. For Linux, Mac, and Windows machines, the ethernet (MAC) address is used. Optionally, for network based licenses, the IP Address can also be used.

Instructions for finding your Host ID or Machine ID:


Windows® (all)


For standalone licenses (including the Student version), the Host ID can be either the volume serial number of the C:\ drive (Option 1), or the MAC Address (Physical Address) of the first Ethernet adapter (Option 2).

NOTE 1: For Concurrent or Network Named User licenses, the volume serial number cannot be used as the Host ID.

NOTE 2: If your computer has a B drive, proceed directly to option 2

Option 1: Volume Serial Number (Standalone licenses & Student Version only)

To obtain the Volume Serial Number, open a Command Prompt window (click the Start Menu, go to All Programs, Accessories, Command Prompt) and run the command:

vol c:

The Host ID will be "DISK_SERIAL_NUM=" and the volume serial number listed without the dashes (ex. DISK_SERIAL_NUM=1234abcd).

Option 2: MAC Address (Physical Address, All licenses)

To obtain the MAC Address, open a Command Prompt window, and run the command:


Use the first Physical Address listed without the dashes (ex. 001122aabbcc).




CPU hostid:

To get this value, run the following command in a Terminal Window:





For a Linux machine, the Host ID is the MAC Address of the eth0 device (first Ethernet device). To obtain this value, run the following command in a Terminal window:

/sbin/ifconfig eth0

The Host ID will be the value listed next to the tag "HWaddr" without the colons.


Mac OS® X


For Macintosh:

1) Open the ‘Applications’ folder

2) Open the ‘Utilities’ folder

3) Launch the ‘Terminal’ application

4) Enter the following command in the command window:

ifconfig en0 | grep ether

Your Host ID is the "ether" value and should be entered as your Host ID without the colons.

**NOTE - For most Macs running OS 10.8.1 and above, you will need to use the ether value for en1 as your Host ID. Run the following command instead:

ifconfig en1 | grep ether

For information on how to change a Host ID or transfer your license from one computer to another, see the related solution: "How do I transfer a license to a new server machine or host?"

For MATLAB & Simulink Student version users, instructions for transferring MATLAB to a new computer can be found in the related solution: "Can I transfer my MATLAB & Simulink Student Version to a new machine?"


Stephen Morris
on 11 Feb 2015

In Yosemite, the value of en1 or en0 is available under system preferences --> Network --> ethernet --> Advanced --> hardware. It is the same as the MAC address. There are 2 problems: many big mac pro machines have TWO ethernet ports. So you have to choose the right one. Laptops have NO hardware port, but the WiFi does have a MAC address, which would appear to be the thing you should use.

Shawn Lyons
on 31 Mar 2015

@Stephen Morris,

MATLAB will try to use the lowest listed en# device, so on the Mac pro, use en0. There is a known bug on some Mac pro systems where the operating system will re-label the network adapters when the system is rebooted. If you experience a license manager error -9 after rebooting your Mac pro, please contact MathWorks support for a workaround.

For the laptop, it will use wlan devices if no en# device is present.

-Shawn MathWorks Support

Alexander List on 18 Aug 2015

Now, I have an interesting question for you.

Imagine someone has a MacBookPro or any other recent laptop with Linux- they come without wired Ethernet devices, just WiFi.

How do you suggest someone activates MATLAB on such a device, where there is no eth0, or any other wired Ethernet?

Answer by Nicholas Fowler on 21 Jan 2015

I have downloaded MatLab and everything but now when I try to access it, an error pops up saying that my username does not match the username in the license file. I'm not a huge tech-guy, so could anybody give me a step process on how to solve this?



Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!