MATLAB Answers

What is the license file search path for MATLAB?

23 views (last 30 days)
What is the order that MATLAB will use to search for licenses as of MATLAB R2008a or later?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 19 Apr 2021 at 4:00
Edited: MathWorks Support Team on 19 Apr 2021 at 17:16
MATLAB will search for licenses in the following order:
1) Any license files or license servers specified with the -c startup flag override all other entries on the license search path.
2) MATLAB will check against the environment variables MLM_LICENSE_FILE or LM_LICENSE_FILE. (LM_LICENSE_FILE is checked first if both are set)
3) MATLAB will check against the registry keys:
HKEY_LOCAL_MACHINE\Software\FLEXlm License Manager\MLM_LICENSE_FILE
HKEY_LOCAL_MACHINE\Software\FLEXlm License Manager\LM_LICENSE_FILE
Or on Unix, it will check for /home/$USER/.flexlmrc
4) MATLAB will check the user's USERPROFILE/HOME location:
MATLAB will first search the $APPDATA\MathWorks\MATLAB\$VER_licenses folder (for Windows), and /home/$USER/.matlab/$VER_licenses (for macOS/Linux). Where:
$APPDATA is the Windows User Application Data location (obtained from navigating to %APPDATA% in explorer)
$USER is the username on the machine
$VER is the folder for the MATLAB version (ex: R2020a)
For example, this will be:
C:\Users\username\AppData\Roaming\MathWorks\MATLAB\R2021a_licenses\
or /home/user/.matlab/R2021a_licenses/
5) Lastly, MATLAB will check in the "licenses" folder under the MATLAB installation. For example:
C:\Program Files\MATLAB\R2021a\licenses (Windows)
/Applications/MATLAB_R2021a/licenses (macOS)
/usr/local/matlab/licenses (Linux)
MATLAB will search for a license.dat first and then any .lic in alphabetical order.

More Answers (0)

Tags

No tags entered yet.

Products


Release

R2008a

Community Treasure Hunt

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

Start Hunting!