Why do I receive MathWorks Licensing Error 9?

Why do I receive the following error:
MathWorks Licensing Error 9
A licensing error occurred while trying to use <PRODUCTNAME>.
The host ID in the license file does not match your computer's host ID.
or
MathWorks Licensing Error 9
A licensing error occurred while trying to use <PRODUCTNAME>.
Your username is not authorized to use this license.

 Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 9 de Dic. de 2025
Editada: MathWorks Support Team el 5 de Sept. de 2025

362 votos

MathWorks Licensing Error 9 may be caused by various reasons:
  • The username or Host ID in the license file does not match
  • (Designated Computer Only) MATLAB is already running under a different user account 

The username in the license file does not match

This error occurs when the OS username of the user launching MATLAB does not match the username that was used during activation. This most often occurs when an administrator activates MATLAB for a user.
To determine your OS username:
  • Windows: Open a command prompt and enter "set username"
  • Mac and Linux: Open a terminal window and type "whoami"
To resolve, reactivate MATLAB with the correct username.
Note: Usernames are case sensitive and may not be recognized if they contain spaces.
 

The Host ID in the license file does not match

To resolve this, verify the Host ID (MAC address) of the machine, then reactivate MATLAB. If your machine has a variable Host ID, configure your system to have a static Host ID, and then reactivate MATLAB.
 

MATLAB is already running under a different user account

With Designated Computer licenses, MATLAB can only be running by one user account on the machine at a time. If there is already a MATLAB process running under a different user, MATLAB issues MathWorks Licensing Error 9.
To resolve this, end the MATLAB process on the other user account. This can be done by restarting the computer.
 

24 comentarios

lis coffey
lis coffey el 23 de Jun. de 2016
Editada: MathWorks Support Team el 13 de Feb. de 2018
I would recommend you reactivate MATLAB to your normal user account by running the "activate_matlab.sh" script in the /bin/ directory of your MATLAB installation directory, and providing your standard username when prompted.
Walter Roberson
Walter Roberson el 6 de Sept. de 2016
Max Ligthart comments
I don't see my activation tool anymore but I have the same problem. can you help me?
Walter Roberson
Walter Roberson el 23 de Feb. de 2017
Surendar Poongavanam comments to Darren Reynolds:
This Helps ! Thanks
Walter Roberson
Walter Roberson el 26 de Oct. de 2017
Veronika, is it possible that your ethernet card changed? Or that you are using a slightly older MATLAB and your Linux is using the new universal device naming system?
Walter Roberson
Walter Roberson el 11 de Jun. de 2018
Contact Mathworks for free installation support.
Note: if you are using Windows 10, some people have been reporting that MATLAB will not launch for them; I do not happen to recall what the causes of that turned out to be.
Walter Roberson
Walter Roberson el 13 de Jun. de 2018
Editada: MathWorks Support Team el 26 de Oct. de 2022
See also my License Error Cheat Sheet for other causes.
Walter Roberson
Walter Roberson el 12 de Dic. de 2018
In the last step where you are activating and need to tell it the name to activate for, be sure to use the same as the output of
whoami
for the user who will be using MATLAB. Do not use root as the name.
Walter Roberson
Walter Roberson el 11 de Nov. de 2019
The volunteers who answer questions here do not have access to the licensing database. You should contact Mathworks for free installation support.
Walter Roberson
Walter Roberson el 17 de Nov. de 2019
Contact Mathworks for free installation support.
Walter Roberson
Walter Roberson el 18 de Mzo. de 2020
Matteo, which link are you referring to as not being able to find?
For R2019b it would be
C:\Program Files\MATLAB\R2019b\bin\win64\activate_matlab.exe
Walter Roberson
Walter Roberson el 23 de Abr. de 2020
You probably activated for your own username. When you sudo you temporarily become a different user.
Shervin Sahba
Shervin Sahba el 5 de Mayo de 2020
This works for me. However, the same error seems to intermittedly reappear on the same system. I'm on a Manjaro Linux 5.4 system running R2020a via my student license.
Any idea as to what is changing my hostid? From what I understand, the hostid is tied to my network interface's MAC address... and I don't understand why that would change.
Walter Roberson
Walter Roberson el 5 de Mayo de 2020
Any reasonably current version of MATLAB for Linux should be able to use any of its interfaces; https://www.mathworks.com/matlabcentral/answers/101892-what-is-a-host-id-how-do-i-find-my-host-id-in-order-to-activate-my-license
I have seen security software that randomizes the user's MAC to reduce tracking; that would interfere with license managers.
Walter Roberson
Walter Roberson el 19 de Jun. de 2020
Cristhian Jadan : you already tried contacting Mathworks Support, but they were not able to find a solution for you?
To launch the activation client on Linux, go into terminal ( https://maker.pro/linux/tutorial/basic-linux-commands-for-beginners ) and cd to the appropriate directory such as /usr/local/MATLAB/R20XXx/bin . Once there,
sh ./activate_matlab.sh
You might possibly need
sudo sh ./activate_matlab.sh
There is no problem at all using the same Mathworks account or the same license with two different OS.
However, each different kind of license has a limitation on the number of simultaneous activations that you can have on different hardware. Not different OS. If you dual boot then unless you used a fairly old MATLAB for WIndows (that keyed off the disk serial number) then MATLAB will notice that the MAC addresses are the same and will permit the activation.
(If you use a virtual machine that uses a different MAC address, then you could end up "using up" an activation as MATLAB might consider them to be different machines.)
Image Analyst
Image Analyst el 2 de Feb. de 2021
What is the specific "windows link" you clicked on? You forgot to tell us. Regardless, call tech support and get a live person on the phone. All installation tech support is fast and free (even for students), so do it now.
Walter Roberson
Walter Roberson el 8 de Jun. de 2021
Do you mean that you get Permission Denied when you ask Windows Explorer to go to the directory that contains the activation client?
Do you mean that you can navigate to the activation client, but you get a permission refusal for running it?
Do you mean that you are able to run it, but it says it does not have access to the destination location? If so then you might need to Run as Administrator.
If the debugging steps here and in https://www.mathworks.com/matlabcentral/answers/99067-why-do-i-receive-license-manager-error-9#answer_213381 did not help, then you will need to contact Mathworks for free installation support.
Walter Roberson
Walter Roberson el 3 de Oct. de 2021
The number of cracks available for various MATLAB versions shows that a significant number of users cannot be trusted .
Walter Roberson
Walter Roberson el 3 de Oct. de 2021
A few years ago, we had one student openly discussing how a class of about 30 students got together and bought one MATLAB Student license, put it on USB drive, and passed it around from person to person. That had been going on for several years, apparently. We have also had people ask whether it would be possible to do pretty much the same thing.
We have had people in business discuss that they set up an automated task to reboot the license server every hour, to avoid having to buy more licenses (that is, they had more demand than they had licenses, so they would log everyone out of MATLAB and let there be a rush to get access to the now-freed licenses.)
We have had people ask how to reduce the license "idle timeout" as low as two minutes, to avoid having to buy more licenses (very high demand for licenses compared to the number they were willing to pay for.)
On other sites, I have seen people who crack MATLAB licenses and actively encourage people to use the cracked licenses because they believe that Mathworks is effectively "stealing" from the world by charging anything for licenses.
Not long ago, I had a discussion with a student who was of the opinion that because going to university is expensive, and some professors required MATLAB, that Mathworks was ripping students off by charging anything for MATLAB. The students choose to take those courses; the professors choose to require MATLAB, but apparently Mathworks is to blame for not providing everything for free.
But, hey, it's Mathwork's fault for not trusting the users, right?
Walter Roberson
Walter Roberson el 15 de Oct. de 2021
People have also argued that it is the university's responsibility to aupply textbooks that are required for courses.
Unfortunately, in some countries, especially with private universities, some universities seem to specialize in wringing money out of students. Fees for everything.
IIRC, way way back there was a modest lab fee for one of my chemistry courses. Computing courses that require non-commercial software licenses but don't want to buy campus licenses, but are required to provide the software, would just charge the costs back as a "lab fee".

Iniciar sesión para comentar.

Más respuestas (5)

Dandan Zhang
Dandan Zhang el 12 de Mzo. de 2016
Editada: MathWorks Support Team el 29 de Oct. de 2025

134 votos

Note: It's your Windows User Name rather than Microsoft Account Name.
You can determine your Windows username as follows:
  1. 1.While sitting at the host computer with press and hold the Windows key and press the letter R on your keyboard.
  2. 2.The Run box will appear.
  3. 3.In the box, type cmd and press Enter. The command prompt window will appear.
  4. 4.Type echo %username% and press Enter. (there is a space between echo and %username%)
  5. 5.Your current username will be displayed.

2 comentarios

Walter Roberson
Walter Roberson el 29 de Mzo. de 2017
See the above on "How do I activate MATLAB?".
After you enter your Mathworks account information, you will get a window asking which user name will be used to run the program; enter your windows username at that place.
Windows-R . When it brings up the small box to type in a command, use the command
cmd
This will cause a full cmd.exe to be launched. When that comes up, at the (Windows) command window, enter the command
echo %username%
The echo does not go into the MATLAB command window; it goes into the Windows command window.
(You can bring up Powershell instead of cmd if you prefer.)

Iniciar sesión para comentar.

Miguel Angel Benavides Morales
Miguel Angel Benavides Morales el 4 de Jun. de 2020

35 votos

Para usuarios de windows 10 Home single language: Presionar la tecla windows, buscar Matlab, en la parte inferior debajo de la pestaña aplicaciones debe aparecer Activate MATLAB. Luego ingresar con usuario y contraseña, darle activar licencia y dejar el nombre del usuarios como aparece (por cambiar ese nombre al momento de la instalación o cambiar el nombre de usuario o de usuario en el pc es que aparece el error), luego seguir los pasos de activador y listo.
Scott Ruffner
Scott Ruffner el 25 de Feb. de 2017
Editada: Scott Ruffner el 25 de Feb. de 2017

28 votos

I was able to fix the error on my MacBook Pro with the advise above from Scott on the MathWorks Installation & Licensing Support team. I've added a few tips and step by step clarifications for others that may have the same issue.
I was receiving the -9 error. I'm running OS X Yosemite 10.10.5
It seems that you need to know which user on your Mac you are using. To find this out open a terminal window and type "whoami". Copy that result. You will need that at last step of the activation process.
I installed MATLAB in the /Applications folder.
In the terminal window go to wherever you installed MATLAB and find the bin sub-directory. For me this was /Applications/MATLAB_R2016b.app/bin
In the terminal I ran the activation script again by typing "./activate_matlab.sh"
Then I went through the steps "Login to MathWorks" [email/password] >> Next Selected the pre-selected license. >> Next Provide a user name/Login Name: (Paste the user name that you copied when you ran whoami above.)
Then open a new finder window go to Applications and try to run MATLAB_R2016b. It opened this time without errors hope this helps.
Michael
Michael el 6 de Sept. de 2014
Editada: Michael el 6 de Sept. de 2014

21 votos

Note for Linux users: when I installed MATLAB on my Manjaro OS, I was required to have 'root' as my username, rather than my actual username.
The solution to this (if you're using a terminal, which is the only way I can access MATLAB), is to open MATLAB as 'root' by entering 'sudo su' (which changes you to root), and then typing 'matlab'.
P.S. The '' marks on words and phrases like 'root', 'sudo su' and 'matlab' are written in this post just to highlight the specific terms and commands. Quotes ('') should not be included when inputting commands into the Terminal.

2 comentarios

Walter Roberson
Walter Roberson el 22 de Oct. de 2016
Lovuit Chen comments to Scott:
This helps!! Thanks
It work mate. I love you. You save my night, going to sleep finally XD

Iniciar sesión para comentar.

Andrew Janke
Andrew Janke el 3 de Oct. de 2019

7 votos

Ouch, dude. That's not a great user experience. I got this same problem when I upgraded my iMac to a newer hardware version. Props to you for the "Troubleshoot" button bringing up this (relevant, correct) answer, but seems like the license transfer process could be made easier, especially for the case of restoring a computer from backup to new hardware.

Categorías

Más información sobre Introduction to Installation and Licensing en Centro de ayuda y File Exchange.

Productos

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by