- License_info.xml
- Specified license file/server
- .flexlmrc directory (Linux and macOS only)
- Environment variables
- User-specific license folders
- Installation-specific license folders
What is the licensing order and license file search path for MATLAB?
122 views (last 30 days)
Show older comments
MathWorks Support Team
on 12 Nov 2015
Edited: MathWorks Support Team
ongeveer 14 uur ago
What is the order that MATLAB will use to search for licenses as of MATLAB R2008a or later?
Accepted Answer
MathWorks Support Team
on 10 Mar 2025 at 0:00
Edited: MathWorks Support Team
ongeveer 14 uur ago
This Answer applies to a local installation of MATLAB. It does not apply to Docker installations of MATLAB. In each of the folders mentioned, MATLAB will search for a license.dat first and then any .lic file in alphabetical order.
The order that MATLAB will look at license files for MATLAB Desktop is as follows. #1 Is the first path MATLAB looks at, while #6 is the last:
If there is a license_info.xml file in MATLAB's installation "licenses" folder or in the user-specific licenses folder, then MATLAB will look at this file and only this file for licensing. This also applies to licensing modes that specify "online" or "onlinelicensing" (usage example: matlab -licmode onlinelicensing).
If you point MATLAB to a specific license file or server with the -c argument, MATLAB will only look at the license file or license server specified with the -c argument. It will skip any of the next licensing paths it would look at (points 3-7.)
On Linux and macOS, MATLAB will look for a directory named .flexlmrc in the user's home directory (/home/$USER or ~). If the directory exists, it will look for license files in here.
MATLAB will check for environment variables MLM_LICENSE_FILE and LM_LICENSE_FILE to see if they are pointing to a license file or license server.
Each installation of MATLAB has a licenses folder that is user-specific. This exact location varies between platform and release.
Windows
%appdata%\MathWorks\MATLAB\R20XXy_licenses
ex: C:\Users\james\AppData\Roaming\MathWorks\MATLAB\R2024b_licenses\
Linux
~/.matlab/R20XXy_licenses
ex: /home/james/.matlab/R2024b_licenses/
macOS
~/Library/Application Support/MathWorks/MATLAB/R20XXy_licenses
ex: /Users/$USER/Library/Application Support/MathWorks/MATLAB/R2024b_licenses
MATLAB has a licenses folder it will check for license files. Its exact location will vary depending on where you installed MATLAB. Below are some examples for each platform, when MATLAB is installed in the default location:
Windows
C:\Program Files\MATLAB\R20XXy\licenses
macOS
/Applications/MATLAB_R20XXy/licenses
Linux
/usr/local/MATLAB/R20XXy/licenses
0 Comments
More Answers (0)
See Also
Categories
Find more on Manage Products in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!