What is the licensing order and license file search path for MATLAB?

조회 수: 122 (최근 30일)
What is the order that MATLAB will use to search for licenses as of MATLAB R2008a or later?

채택된 답변

MathWorks Support Team
MathWorks Support Team 2025년 3월 10일 0:00
편집: MathWorks Support Team 대략 14시간 전
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:
  1. License_info.xml
  2. Specified license file/server
  3. .flexlmrc directory (Linux and macOS only)
  4. Environment variables
  5. User-specific license folders
  6. Installation-specific license folders

 

1. License_info.xml

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).

 

2. Specified license file/server

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.)

 

3. .flexlmrc directory (Linux and macOS only)

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.

 

4. Environment variables

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.

 

5. User-specific license folders

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

 

6. Installation-specific license folders

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개)

카테고리

Help CenterFile Exchange에서 Manage Products에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

제품


릴리스

R2008a

Community Treasure Hunt

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

Start Hunting!

Translated by