Locate Your License File
R2026bSome MathWorks® licenses use a license file to activate your software. In most cases, you do not need to locate this license file. Depending on the installation, the installer might generate this file automatically or your administrator might place this file on your computer manually. However, you might need to locate your license file to troubleshoot startup or activation issues.
This topic describes how to locate the license file for your current installation. If you are adding or removing products, renewing your license, or setting up a new product installation, download a new license file instead. For more details, see Get License File and File Installation Key.
Determine Your License Option
The location of your license file depends on the license option: Individual, Designated Computer, Concurrent, or Network Named User. If you already know your license option, skip to the section that corresponds to that option. Otherwise, to determine your license option, follow these steps:
Go to the License Center. In the table of licenses, in the Option column, find the entry for the license you are using.
If you do not know which license you are using, at the MATLAB® command prompt, enter this command:
The returned license number (for example,license
'1234567') identifies the license in use. Return to the table in the License Center. In theLicensecolumn, find the entry that has the number you got from thelicensecommand. Find your license option in the Option column of the same row.If you cannot run MATLAB, or if you cannot access the License Center, contact your administrator for help with determining your license option. See Find Your License Administrator.
Follow the instructions that correspond to your license option:
Individual— See Locate Individual Licenses.Designated Computer— See Locate Designated Computer Licenses.ConcurrentorNetwork Named User— See Locate Concurrent and Network Named User Licenses.All other license options — Contact your license administrator to help you locate your license file. See Find Your License Administrator.
Some licenses, such as licenses that have both an Option value of
Total Headcountand a Use value ofAcademic, do not user a license file. MathWorks activates the software for these licenses when you sign in to your MathWorks Account at startup.
Locate Individual License Files
Individual licenses are assigned to named users. By default, Individual license files
are named license.lic.
To locate an Individual license file, look in the user profile folder (Windows®) or home folder (Mac, Linux®). The paths below show the location of this folder for the latest MATLAB release. These folders include licenses for both MATLAB and Polyspace® products. To find licenses for RoadRunner products, replace MATLAB with
RoadRunner in the folder paths.
Windows:
%AppData%\MathWorks\MATLAB\R2026b_licenses%AppData%is an environment variable that contains the path to the hidden system folderAppData. This variable works in common Windows applications such as Command Prompt and File Explorer. If you are using Windows PowerShell, replace%AppData%with the variable$env:AppData.
Mac:
/Users/$USER/Library/Application Support/MathWorks/MATLAB/R2026b_licenses$USERis an environment variable that contains your computer login name.
Linux:
$HOME/.matlab/R2026b_licenses$HOMEis an environment variable that contains the path to your home folder (for example,/home/myUsername).
Locate Designated Computer License Files
Designated Computer licenses are assigned to specific devices. By default, Designated
Computer license files are named license.lic.
To locate a Designated Computer license file, look in the licenses
subfolder of your product installation folder. The paths below show the default location of
this folder for the latest MATLAB release. To find licenses for Polyspace products, replace MATLAB with Polyspace
in these paths. RoadRunner licenses are not in the product installation folder because RoadRunner does not have a Designated Computer license option.
Windows:
C:\Program Files\MATLAB\R2026b\licensesMac:
/Applications/MATLAB_R2026b.app/licensesLinux:
/usr/local/MATLAB/R2026b/licenses
Locate Concurrent and Network Named User License Files
If you have a Concurrent or Network Named User license, then the license file,
license.dat, resides on a license server that only your server
administrator can access. However, you can locate either the client license file
(network.lic) or the MLM_LICENSE_FILE environment
variable that points to the port and hostname of the license server. Client machines use
either the file or environment variable, but not both.
To check if your client machine uses a network.lic file, look for it
in the licenses subfolder of your product installation folder. The paths
below show the default location of this folder for the latest MATLAB release.
Windows:
C:\Program Files\MATLAB\R2026b\licensesMac:
/Applications/MATLAB_R2026b.app/licensesLinux:
/usr/local/MATLAB/R2026b/licenses
To check if your client machine uses the MLM_LICENSE_FILE environment
variable, use one of the sample commands below. The value of this environment variable is
in the format port@hostname, which specifies the port number and
hostname of the license server.
Windows Command Prompt:
set MLM_LICENSE_FILEMLM_LICENSE_FILE=27000@my-license-server
Linux or Mac Terminal:
echo $MLM_LICENSE_FILE27000@my-license-server
Start MATLAB Using a Specific License
To start MATLAB with a specific license, from the operating system command line, run
matlab -c <license>. Here, <license>
is the path to a license file or the port and hostname of a license server in the format
port@hostname. For example:
matlab -c /path/to/license.licmatlab -c 27000@my-license-serverThe license specified by the -c option takes precedence over other
options on the license search path. For more details, see MATLAB License Search Path.
See Also
(MATLAB) | licensematlab (Windows) (MATLAB) | matlab (macOS) (MATLAB) | matlab (Linux) (MATLAB)