Install Guide
Install Guide
Installation Guide
R2021a
How to Contact MathWorks
Phone: 508-647-7000
Manage Products
2
Update MathWorks Software Using Internet Connection . . . . . . . . . . . . . 2-2
Update Existing Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
Add Products to an Existing Installation . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
v
Update Your License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
Automatic License Updates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
Update License Manually from Within MATLAB . . . . . . . . . . . . . . . . . . . . 2-7
Update License Using Activation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
Update License for Offline Computer . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
vi Contents
Step 3: Start the Installer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-20
Step 4: Review the Software License Agreement . . . . . . . . . . . . . . . . . . . 3-21
Step 5: Select License File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-21
Step 6: Select Destination Folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-21
Step 8: Select Options (Windows Only) . . . . . . . . . . . . . . . . . . . . . . . . . . 3-22
Step 9: Confirm Selections and Install . . . . . . . . . . . . . . . . . . . . . . . . . . 3-22
vii
1
Consider disabling antivirus software and Internet security applications on your computer during
installation. These applications can slow the installation process or cause it to appear unresponsive
(or to hang).
Installing on Shared Computers You must have the correct permissions to install the software. If
you have questions about permissions, ask your system administrator.
Changing the tmp directory for installation To change the tmp folder for installation, see
MATLAB Answer How can I change the temp directory the MATLAB installer uses?
If you have Two-Step Verification enabled in your MathWorks Account, you will be prompted to enter
the verification code sent to your primary method when you signed in to your MathWorks Account. If
you do not have Two-Step Verification enabled, you can go directly to the next step.
If you do not have a MathWorks Account, select one of the following procedures determined by your
situation:
1-2
Install Products Using Internet Connection
1 From the Downloads page on the MathWorks website, select the release you want to install and
the platform of the computer that you are installing on.
2 Start the installer. When asked if you want to allow the application to make changes, answer Yes.
3 If your computer has been configured to use a proxy server for Internet access, enter the user
name and password to continue with a standard installation. Contact your system administrator
for proxy server credentials.
If you do not agree with the terms of the license agreement, you will be unable to install MathWorks
products.
If you do not have any licenses listed or you do not see the license you want to use:
• You may need to link a license with your account. See Link a License on the MathWorks website.
• You may be on an organizational license. Follow the steps in "Use an Activation Key" in the next
topic.
If you are using a Student license, accept the Student Use Policy when prompted.
If you are still unsure of what to do, contact your administrator or Contact Support on the MathWorks
website.
If you want to install products on a license that is not linked to your MathWorks Account, ask your
administrator for the Activation Key. The administrator on the license can retrieve the key by going to
the License Center on the MathWorks website. If you are using a trial license, go to https://
www.mathworks.com/licensecenter/trials.
1-3
1 MathWorks Product Installation
During installation, you can activate the software right away and you will not require an Internet
connection (for authentication) when you use MathWorks software thereafter on this computer. The
activation process stores a license file that grants you the right to use the software.
If multiple users are expected to use this computer, or this software is being used in a cloud
environment, you can select to authenticate the software each time it is started. This option requires
each user to sign in to their MathWorks Account to use MATLAB.
MathWorks uses the account information to grant license rights. With this option, MATLAB
periodically checks if the connection to MathWorks is still active. If it cannot detect an active
connection after a certain period of time, it terminates the session.
The destination folder must be on an absolute path. MathWorks recommends that you install
MathWorks products in their own folder. If you select the top-level drive, you will be asked to confirm
your selections.
• You can use any alphanumeric character and some special characters, such as underscores.
• You cannot use non-English characters.
• Folder names cannot contain invalid characters and the destination cannot be named “private.”
If you make a mistake while entering a folder name and want to start over, click Restore Default.
• To install a particular product, check the box next to its name. MATLAB is selected by default.
• If you do not want to install a particular product, clear the check box next to its name.
• If any of your selected products have a dependency on a product that was not selected, you will
get a Product Dependencies warning and you will be asked to add the dependent products.
Dependent products are optional and you can choose to add or not add them. However, while you
are still able to install the selected products without dependent products, you may not be able to
access all the functionality you require.
• Required products must be installed.
1-4
Install Products Using Internet Connection
• Windows® — You can choose to put shortcuts for starting MATLAB in the Start menu and on the
desktop.
• Linux® — You can specify whether you want to create symbolic links to the matlab and mex
scripts. Specify a folder to which you have write access and that is common to all the user paths
on this computer, such as /usr/local/bin.
When the installation is complete, note if the installer shows you any additional steps required to
complete configuration, and click Finish. If additional steps are required, complete them before
running MATLAB.
1-5
1 MathWorks Product Installation
After you download the installer and products, you can install MathWorks products from the
download location at any time. If you are using a File Installation Key, make sure the downloaded
product files include the installer file and are in a location that an off-network computer can access.
If the target computer is not connected to the Internet, install products following the procedure in
“Install Products Using File Installation Key” on page 1-9.
1 From the Downloads page on MathWorks, select the release and platform of the computer that
you are using to download (not the target computer).
2 Start the installer. When prompted to allow the app to make changes, answer Yes.
3 If prompted again, sign in to your MathWorks Account and accept the MathWorks license
agreement.
4 From the installer, select Advanced Options > I want to download without installing.
• You can use any alphanumeric character and some special characters, such as underscores.
• You cannot use non-English characters.
• Folder names cannot contain invalid characters and the destination cannot be named “private.”
You can select multiple platforms; during the download, you will get a separate folder for each
platform.
1-6
Download Products Without Installing
• To make a particular product available for installation on the target computer, check the box next
to its name. MATLAB is selected by default.
• If you do not want to have a particular product available for installation on the target computer,
clear the check box next to its name.
• If any of your selected products have a dependency on a product that was not selected, you will
get a Product Dependencies warning and you will be asked to add the dependent products.
Dependent products are optional and you can choose to add or not add them. However, while you
are still able to install the selected products without dependent products, you may not be able to
access all the functionality you require.
• Required products must be installed.
When the software is installed, the products available for installation will depend on what is allowed
on the license.
The installer preselects the option to open a file browser to display the downloaded files after you
click Finish. To not automatically open this folder, deselect Open Downloads Folder before you
click Finish.
Verify that the folder containing the product files includes the following:
• The installer file for the target platform in the root of the folder:
• Windows— setup.exe
• Linux—install
• macOS—InstallForMacOSX
• An archives subfolder
If the archives subfolder contains less than three files, you might be missing required files and
must download the files again.
Next Steps
The procedure you follow depends on whether or not the target computer is connected to the
Internet.
1-7
1 MathWorks Product Installation
• With Internet connection: use the procedure in “Install Products Using Internet Connection” on
page 1-2
• Offline: use the procedure in“Install Products Using File Installation Key” on page 1-9
See Also
Related Examples
• “Install Products Using File Installation Key” on page 1-9
1-8
Install Products Using File Installation Key
You can use this procedure even if you have an Internet connection. You are not required to
disconnect the target computer.
Consider disabling antivirus software and Internet security applications on your computer during
installation. These applications can slow the installation process or cause it to appear unresponsive
(or to hang).
Installing on Shared Computers You must have the correct permissions to install the software. If
you have questions about permissions, ask your system administrator.
Changing the tmp directory for installation To change the tmp folder for installation, see
MATLAB Answer How can I change the temp directory the MATLAB installer uses?
If you do not agree with the terms of the license agreement, you will be unable to install MathWorks
products.
1-9
1 MathWorks Product Installation
your organization's license, contact your administrator. Enter the File Installation Key where
prompted.
• If the product files are not found by the installer, you will get an error before you enter the File
Installation Key. This message includes instructions for downloading the necessary files.
• If you get a message saying that the key is invalid, check to make sure you entered the key
correctly. If necessary, get a new File Installation Key.
• If you get a message saying that the key is invalid for the release you are trying to install, see your
administrator or go to the License Center to get the files for the File Installation Key you have. If
you are using a trial license, go to https://www.mathworks.com/licensecenter/trials.
The destination folder must be on an absolute path. MathWorks recommends that you install
MathWorks products in their own folder. If you select the top-level drive, you will be asked to confirm
your selections.
• You can use any alphanumeric character and some special characters, such as underscores.
• You cannot use non-English characters.
• Folder names cannot contain invalid characters and the destination cannot be named “private.”
If you make a mistake while entering a folder name and want to start over, click Restore Default.
• To install a particular product, check the box next to its name. MATLAB is selected by default.
• If you do not want to install a particular product, clear the check box next to its name.
• If any of your selected products have a dependency on a product that was not selected, you will
get a Product Dependencies warning and you will be asked to add the dependent products.
1-10
Install Products Using File Installation Key
Dependent products are optional and you can choose to add or not add them. However, while you
are still able to install the selected products without dependent products, you may not be able to
access all the functionality you require.
• Required products must be installed.
• Windows — You can choose to put shortcuts for starting MATLAB in the Start menu and on the
desktop.
• Linux — You can specify whether you want to create symbolic links to the matlab and mex
scripts. Specify a folder to which you have write access and that is common to all the user paths
on this computer, such as /usr/local/bin.
When the installation is complete, note if the installer shows you any additional steps required to
complete configuration, and click Finish. If additional steps are required, complete them before
running MATLAB.
See Also
Related Examples
• “Download Products Without Installing” on page 1-6
1-11
2
Manage Products
Add products, update current MATLAB installation, update license, and upgrade to a new release.
2 Manage Products
When you install a MATLAB update, you get not only the most recent update for your version, but
also all prior updates for your version as well.
If a more recent version is available, a notification displays in MATLAB when you start the program.
To install the MATLAB update, click the notification icon and select Install Update. If you click the
notification and then decide to update at a later time, the notification icon is no longer red, but you
can still install the update.
See Also
Related Examples
• “Upgrade MATLAB Release” on page 2-6
External Websites
• License Center
2-2
Update MathWorks Software Using Internet Connection
• Web Downloads
2-3
2 Manage Products
Note Use this procedure only for R2018b and later. This process can be followed by license
administrators only.
The optimal experience for installing an update is from within MATLAB on a computer connected to
the Internet. When that is not possible, however, administrators can perform an update to an existing
MATLAB installation on any computer by downloading the update package.
Download the update package to an online computer, and then install the package on the user's
computer.
1 Go to the Downloads page on the MathWorks website and select your release.
2 Under Related Links, click Get Update Package for Offline Installation.
3 Follow the instructions to download the update package to the user's computer or to a network
share location. Make sure you download the package that matches the platform for the computer
that requires the update.
4 Unzip the update package to a new folder, For example, C:\temp\R2021a_Update1_Package.
Make sure the folder is accessible to the user's computer.
5 On the user's computer, close all instances of MATLAB.
6 Install the update according to the instructions for your operating system. In the command for
each platform, argument package_folder is the full path to the directory where you unzipped
the update package.
• Windows Systems
a Go to a command prompt.
b Change folder to:
matlabroot\bin\win64
matlabroot/bin/glnxa64
2-4
Update MathWorks Software on Offline Computer
a Open a terminal.
b Change folder to:
matlabroot/bin/maci64
Installation status is not displayed in the terminal or at the command prompt. Instead, you can find all
status messages in the log at \%TEMP%\mathworks_yourusername.log (Windows) or /tmp/
mathworks_yourusername.log (Linux or macOS). Examine the log carefully for errors.
See Also
Related Examples
• “Update MathWorks Software Using Internet Connection” on page 2-2
2-5
2 Manage Products
1 Run the MATLAB installer. If you do not have it on your computer, you can get it from the
Downloads page on the MathWorks website.
2 Install the upgrade in a new installation folder, whether you are upgrading from a previous
version or upgrading from a prerelease version of the same release.
You do not need to delete an existing MATLAB installation before installing a new release. Each
release is independent of previous releases and you can run multiple releases on the same computer.
Note The upgrade installs only those products currently on your license. For example, if your
existing installation includes ten products, but your current license includes only nine of those
products, your MATLAB installation upgrade will include only the nine products.
See Also
Related Examples
• “Update MathWorks Software Using Internet Connection” on page 2-2
2-6
Update Your License
You can disable validation in the License Center at the MathWorks website.
1 On the Home tab, in the Resources section, click Help > Licensing.
2 Select Update Current Licenses... and follow the prompts to update your license.
MATLAB contacts MathWorks to retrieve the most current version of the License File for the license.
The update process overwrites the current License File on your system. You need to restart MATLAB.
For instructions on using the activation client, see “Activate MATLAB Installation Manually” on page
3-13.
Note If you are a license administrator, follow the procedure in “Update Network License” on page
3-8.
1 Sign in to www.mathworks.com.
2 Click on your profile picture or initials in the top right and then select My Account.
You can also get to your MathWorks Account from within MATLAB. On the Home tab, in the
Resources section, click Help > Licensing > Manage Licenses.
3 Under My Software, select your license number from the list. If you have more licenses than fit
on the screen, click View additional Licenses or Trials. Clicking a license takes you to the
License Center.
4 Click the Install and Activate tab.
2-7
2 Manage Products
5 On the right side, under Related Tasks, select Activate to Retrieve License File.
6 Fill out all required fields and follow prompts. Click Continue.
7 At Next Steps, click Download License File.
8 Skip Step 2 (because you have already done it as part of this procedure) and click Done.
9 Copy the license file to the licenses folder on the offline computer. The following support article
contains instructions for finding license file folders on various operating systems: "Where are the
license files for MATLAB located?"
10 Start MATLAB.
See Also
Related Examples
• “Individual License Administration”
2-8
Uninstall MathWorks Products
If you no longer have a valid license and just want to remove the software from your computer, it is
best to deactivate before removing your installation. For more information about deactivating
software, see “Deactivate Your Installation” on page 2-12.
If you need assistance for any part of this process, Contact Support.
The method you use to uninstall MathWorks software from your computer varies, depending on your
platform.
1 Exit MATLAB.
2 Start the uninstaller, using any of the following methods.
• On computers running Windows 10, go to MATLAB R2021a and open the folder. Right-click
MATLAB inside the folder, and select Uninstall.
• On computers running Windows 7, click the Start menu, and select Control Panel. In the
Control Panel, select Uninstall a Program in the Programs category. From the list of
products displayed, click MATLAB R2021a.
• Assuming you selected the default folder when you installed MATLAB, navigate to
C:\Program Files\MATLAB\R2021a\uninstall\bin\win64. If you installed in a
different folder, navigate there instead. Double-click the uninstaller executable,
uninstall.exe.
To use the uninstaller properties file (uninstaller_input.txt) to run the uninstaller noninteractively,
see “Uninstall Products Noninteractively” on page 2-10.
3 In the Uninstall Products dialog box, select the products you want to remove and click Uninstall.
If you select MATLAB, you automatically remove all other MathWorks products.
You might receive a message telling you that the product you want to uninstall has other
products that depend on it. For example, most MathWorks products require the MATLAB
product. To close the message and continue removing products, click OK. To change the
products you had selected for deletion, click Cancel.
If you also want to remove your MATLAB user preferences, click the Uninstall MATLAB
preference files (including Command History) check box. By default, the uninstaller does not
delete these preference files. MATLAB preference files contain your environment settings, such
as command history and Help favorites. To find where MATLAB stores your preferences, use the
prefdir command at the MATLAB prompt, as in the following example:
prefdir
ans =C:\Users\username\AppData\Roaming\MathWorks\MATLAB\R2021a
2-9
2 Manage Products
username is the user name (login name) of the person who runs MATLAB on this computer.
4 (Optional) Choose whether to delete download archive files. If your MATLAB installation folder
contains the archive files for downloaded products, the uninstaller displays a message asking if
you want to delete these archive files. The installer stores these archive files in the matlabroot
\archives folder of your installation. To remove these files, click Yes.
5 To proceed with the removal, click the Uninstall button. The uninstaller displays the status of
the operation as it progresses and displays a dialog box when the operation is complete. Click
Finish to exit the uninstaller. When you uninstall a MATLAB installation, the uninstaller displays
a dialog box suggesting that you deactivate the installation. For more information about
deactivation, see “Deactivate Your Installation” on page 2-12.
rm -rf matlabroot
To uninstall MATLAB:
1 Get the user name and password of an administrator account on the macOS computer.
Depending on where you installed MATLAB software, you might need administrator privileges to
remove it.
2 Exit MATLAB.
3 Navigate to your MATLAB installation folder. For example, the installation folder might be named
MATLAB_R2021a.app in your Applications folder.
4 Drag your MATLAB installation folder to the trash, and then select Empty Trash from the
Finder menu.
If you need to deactivate the software, see “Deactivate Your Installation” on page 2-12.
By default, the uninstaller removes all the products in a particular MATLAB installation, however,
you can specify which products to delete. In the product list in the template, remove the
comment character at the beginning of the product name. In silent mode, if you specify a product
2-10
Uninstall MathWorks Products
for deletion that is not one of your installed products, the uninstaller exits and writes a message
to your log file. If you specified mode=automated, the uninstaller displays the Product Selection
dialog box and pauses, waiting for you to adjust the product selection.
3 Save your changes to the file.
4 Run the uninstaller (uninstall.exe), using the -inputFile flag to specify the properties file
as a command-line argument.
For example, click Start and select the Run option. In the Run dialog box, enter the uninstall
command, specifying the full path of the properties file as a command-line argument:
See Also
Related Examples
• “Deactivate Your Installation” on page 2-12
• “Install Noninteractively” on page 3-10
2-11
2 Manage Products
The deactivation process has two parts: the license must be deactivated on your computer and must
also be deactivated in MathWorks systems. If you have Internet connectivity, the MathWorks
deactivation application can take care of both parts of the process. If you do not have Internet
connectivity, the deactivation application disables the software on your computer and gives you a
deactivation string. To complete the deactivation process, go to the MathWorks website, log in to your
account, and deactivate using the deactivation string. When you deactivate a license, you deactivate
all the installations of that license on a particular computer.
Note Deactivating a license and removing the software are separate activities. You can deactivate a
license without removing the software from your computer. For information about removing an
installation, see “Uninstall MathWorks Products” on page 2-9.
Windows Systems
matlabroot\uninstall\bin\win64\deactivate_matlab.exe
Linux Systems:
matlabroot/bin/deactivate_matlab.sh
macOS Systems:
/Applications/MATLAB_R2021a.app/bin/deactivate_matlab.sh
2 Select the license that you want to deactivate and click Deactivate.
When the deactivation application starts, it displays the licenses you currently have installed and
activated on your computer. If you start the application from within MATLAB, the license you are
using is preselected.
3 Confirm deactivation. Click Yes and the deactivation application attempts to contact MathWorks.
4 Complete deactivation. Click OK.
2-12
Deactivate Your Installation
If the deactivation application can deactivate the license on your computer and at MathWorks, it
displays the Deactivation Complete dialog box. Click OK to return to the MathWorks Software
Deactivation dialog box, where you can choose to deactivate other licenses.
If the deactivation application can deactivate the license on your computer but not in MathWorks
systems, it displays the Deactivation Next Steps dialog box. This dialog box contains the
deactivation string. To complete deactivation, go to the MathWorks website and log in to your
account. In the License Center, deactivate the license using the deactivation string. Click OK to
return to the MathWorks Software Deactivation dialog box.
5 After you deactivate a license, the MathWorks Software Deactivation dialog box displays an
additional column listing the status of the licenses. To deactivate another license, select it from
the list and click Deactivate. If you are finished, click Close to exit the deactivation application.
See Also
Related Examples
• “Uninstall MathWorks Products” on page 2-9
2-13
3
Install and run the network license manager, configure licenses and modify license options, update
network licenses
3 Administer Network Licenses
Configuration
For network installations, MathWorks uses a license manager program from Flexera Software, Inc.
(referred to in this documentation as the network license manager).
In a local client access configuration, you install the network license manager on a server, and then
install MATLAB on each client computer.
You can use the MathWorks product installer to perform both types of installations.
• Installing the network license manager on a server — For network installations, you must
install the network license manager to control product access. You install the license manager on
a server that is available to all your network users, referred to in this documentation as the license
server.
• Installing MathWorks products on each client computer — Install the product files on each
client computer. Client computers must be able to connect to the license server over a network.
You can choose online or offline installation and activation, and you can choose to perform the
installations yourself or have others do it.
The license manager uses license keys to control access to MathWorks products. MATLAB checks out
a license key when it starts up or uses functions in other products. When all the keys for a particular
product are checked out, the license manager denies further requests.
If you want to integrate MathWorks products into an already established license management
scheme, you can copy the MathWorks license management daemons onto your computer instead of
using the installer to install the network license manager. .
Note Activate the license for the installation before you run the installer. To retrieve the license file
needed for your configuration, go to the License Center on the MathWorks website. Provide the host
ID of the computer on which you intend to run the network license manager when requesting a
license file. You specify the location of your license file during installation.
3-2
Plan Your Network Installation
Select one of the following installation procedures for the network license manager:
• “Install Network License Manager with Internet Connection” on page 3-17 for online installation
• “Install Network License Manager Offline” on page 3-20 for offline installation
After you have installed the network license manager, select a procedure for installing MATLAB.
• Do not expose the commands to run the network license manager to the Internet or an untrusted
network.
• Start the network license manager so that local administrator access is required to run the
shutdown procedure. .
3-3
3 Administer Network Licenses
3-4
Plan Your Network Installation
See Also
Related Examples
• “Install Products Using Internet Connection” on page 1-2
• “Install Products Using File Installation Key” on page 1-9
• “Install Noninteractively” on page 3-10
• “Have End Users Install Products” on page 3-12
3-5
3 Administer Network Licenses
In general, you do not need to modify the network license file on the server or on the client
computers. However, in some situations, you must edit the license file:
• When you change the license server name (for example, if the license is now being hosted on a
new server).
• When you change the port number (for example, if the port address for the server has changed).
The following support article contains instructions for migrating MATLAB client installations:
"Migrate MATLAB Client Installations to New License Server".
• When you update the network installation with a new license file. See Update License File on
License Server on the MathWorks website.
• Each INCREMENT line identifies a product, the number of keys available for the product, and other
information. (The INCREMENT lines in your license file might not include every element shown in
the example.)
• The backslash (\) character indicates that the line continues onto the next line.
• The lines that begin with a pound sign (#) are comments. The MathWorks installer uses the
information in these comment lines such as license server host ID or Internet address when it
processes the license file during installation.
3-6
Network License Files
• Makes a copy of the network license file named license.dat, and puts this copy in the /etc
folder of the MATLAB installation folder.
• Adds a SERVER line and a DAEMON line to the file. The SERVER line identifies the server host and
port number. The DAEMON line identifies the name of the network license manager daemon.
• Stores the processed license file in matlabroot/etc, where matlabroot is the MATLAB
installation folder.
• When it creates an options file during installation, it also adds the Options= syntax to the
DAEMON line in your license file. This syntax specifies the path name of the options file.
For example, if your server is named thunderball and its IP address is 144.212.111.103, the
SERVER and DAEMON lines in your license file would look like this:
• Creates a copy of the license file you specify named network.lic, and puts the file in the
\licenses folder in the MATLAB client installation folder.
• Deletes all the INCREMENT lines and the DAEMON line in the license file, leaving the SERVER line. It
also adds the statement USE_SERVER to the file. This line points the client to the network license
file on the server, which contains all the passcodes for the products.
1 The license file specified on MATLAB startup command line using the -c option. The -c option
overrides the entire search order and uses only what was specified on the command line. This is
the only path MATLAB searches.
2 Environment variables MLM_LICENSE_FILE and LM_LICENSE_FILE.
3 The profile folder of the person starting the program
4 The \licenses folder in the MATLAB installation for files named license.dat or any file with
the extension .lic.
By default, MATLAB installs the license file on the client computer in the \licenses folder in the
MATLAB client installation folder. However, you can override that location in one of either of the
following ways:
• Specify the path to the license file on the command line during MATLAB startup using the -c
option.
The -c option overrides the entire search order, including environment variables, and uses only
what was specified on the command line. This is the only path MATLAB searches.
You can specify a list of paths to search. When using the -c option, keep in mind the following:
3-7
3 Administer Network Licenses
• If the path to your license file contains a space, enclose the path name in quotation marks.
• If you are specifying more than one license file, make sure to enclose the entire list of license
files in quotation marks.
• Set environment variables.
• MLM_LICENSE_FILE — Specifies the location of the license file, but only for MathWorks
products. (Recommended, because it affects only MathWorks products.) MATLAB searches for
this environment variable first.
• LM_LICENSE_FILE — Specifies the location of the license file for all applications using the
network license manager on this server. It is not recommended that you use this environment
variable, as if affects all Flex-enabled products.
You can use one option or the other, but not both.
Note Do not follow this procedure to upgrade to a new release of MATLAB. To upgrade to a later
release, see “Upgrade MATLAB Release” on page 2-6.
1 Go to the License Center on the MathWorks website and sign in to your account.
2 Select the licenses you want to update.
3 Click Install and Activate.
4 Get the license file for the server you are updating.
5 Stop the network license manager.
6 Open both the existing license on the server and the new license in an editor. You are going to
copy most of the new license into the old license with these instructions:
a In the existing license, delete all content except the SERVER and DAEMON lines at the top
of the file.
b In the new license, copy all content starting from below the SERVER and DAEMON lines to
the end.
c Paste the copied content into the existing license below the SERVER and DAEMON lines.
d Save the existing license. You can store the new license as a backup, remembering that the
SERVER and DAEMON lines must be replaced with those specific to your organization.
7 If you have an options file, depending on how it is configured, you may have to update it. If you
do not have an options file, skip this step.
8 Start the network license manager.
3-8
Network License Files
You can perform a status inquiry to confirm that the license file has been updated. The following
support article contains instructions for performing a status inquiry: "Monitor the Usage of Licenses
or Keys".
See Also
External Websites
• License Center
3-9
3 Administer Network Licenses
Install Noninteractively
Note You need a File Installation Key to use the installer properties file (installer_input.txt).
For information about installation using a File Installation Key, see “Install Products Using File
Installation Key” on page 1-9.
1 Ensure that the product files, including the MATLAB product installer, are available in an
accessible location; for example, in the default downloads folder on your computer or on a
network share. If the product files are located in a folder other than the default downloads folder
on your computer, the installer file must be located in the same folder as the product files. For
information about downloading product files, see “Download Products Without Installing” on
page 1-6.
2 Create an installer properties file.
Make a copy of the installer properties file template, named installer_input.txt. This file is
located in the top level of the folder where you downloaded the software (typically, C:\Users
\user\AppData\Local\Temp\mathworks_downloads).
destinationFolder=C:\Program Files\MATLAB\R2021a
The installer properties file template contains descriptions of each parameter along with valid
values. Specify your File Installation Key as the value of the fileInstallationKey=
parameter.
4 Save your changes to the file.
5 Start the installer using the -inputFile option to specify the full path of your installer
properties file as a command-line argument.
For example, on Windows computers, click the Start menu and select the Run option. In the Run
dialog box, enter:
3-10
Install Noninteractively
For information about specifying an installer properties file on Linux and macOS computers, see
the instructions in the installer properties file template (installer_input.txt).
3-11
3 Administer Network Licenses
For this workflow, provide the person doing the installation with the following items:
• MathWorks license file — Give users a copy of the MathWorks license file that was processed
during installation of the network license manager on your server. This license file must contain
the correct SERVER line for the license server you are using. See “License Processing During
MATLAB Installation” on page 3-6.
Note Do not give users a copy of the original license file you received in the licensing email. They
cannot use the licensing information in this form — it does not include the correct SERVER line.
Also, do not forward to users the licensing email you received from MathWorks.
• Access to product files — You can download the product files and make them available on a
server that is accessible to all clients or on removable media. For these scenarios, users need a
File Installation Key to install products. See “Download Products Without Installing” on page 1-6.
If your end users have MathWorks Accounts, you can give them the Activation Key for the license
and let them log in to their accounts to install their MathWorks products.
• Installation instructions — Refer to the table in “Installation Procedures for MATLAB” on page
3-3 to provide the person performing the installation with the correct instructions, as they differ
slightly depending on whether the target computer has an Internet connection.
See Also
Related Examples
• “Plan Your Network Installation” on page 3-2
• “Install Products Using Internet Connection” on page 1-2
• “Install Products Using File Installation Key” on page 1-9
3-12
Activate MATLAB Installation Manually
Activation Overview
Activation is a process that verifies licensed use of MathWorks products. This process validates the
license and ensures that it is not used on more computers or by more users than allowed by the
license option you have acquired. Normally, the installer continues to activation as part of the entire
installation process, and there is no action for the end user.
However, there may be occasions to manually activate the software, for example, if the activation
during installation fails for some reason, or if the installation was performed using a File Installation
Key and no license was supplied.
This topic describes how to activate the software manually should you need to.
If you are an end user who has been asked to activate MATLAB software that was not installed by
you, follow the procedure in “Activate Installation Using Internet Connection” on page 3-13 if you
have an Internet connection. If you do not, follow the instructions in “Activate Installation Offline” on
page 3-16.
MATLAB starts the activation application, which walks you through the activation process.
Answer the questions on each dialog box, select the license you want to activate, and click
Activate.
• Leave the Activate MATLAB check box selected on the Installation Complete dialog box at the
end of installation. When the end user starts MATLAB, the activation process automatically starts.
• If you have MATLAB already running, on the Home tab, in the Resources section, select Help >
Licensing > Activate Software.
• Navigate to your MATLAB installation folder and open the activation application.
3-13
3 Administer Network Licenses
• If you are connected to the Internet, leave the Activate automatically using the Internet
(recommended) option selected. Activating immediately after installation is the quickest way to
start using MATLAB.
• If you are not connected to the Internet, select Activate manually without the Internet. If you
select this option, you need a license file to activate manually. Your license file identifies the
products you can run. Contact the Administrator of the license to get the file if you do not already
have it.
Using a Proxy Server
If your Internet connection requires a proxy server, click the Connection Settings button. You can
enter the server name and port information in the Proxy Settings dialog box, and access other
activation options. MathWorks supports several types of proxy configurations: Basic authentication
and Digest authentication.
On Windows and macOS computers, the activation application uses your computer proxy settings by
default. . If the proxy settings are not set, you can click Connection Settings to manually set them.
Note If you continued with activation immediately after installation, and you logged in to your
account during installation, the activation application skips this step.
Enter the email address and password of your MathWorks Account and click Next. The activation
application contacts MathWorks to retrieve the licenses linked to your account. If you have enabled
Two-Step Verification on your account, enter the verification code sent to your primary method.
If you do not have a MathWorks Account, select the option I need to create an Account (requires
an Activation Key) and click Next.
If you already have a license file, select the option Enter the full path to your license file,
including the file name, specify the complete path to the file, and click Next. After specifying the
license file, the activation application skips all the subsequent steps in the process and goes directly
to the Activation Complete dialog box.
Note Your license file identifies the products you can run. Contact the administrator of your license
to obtain this license file.
To create an account, enter your email address, first name, last name, and password. You must also
provide an Activation Key. A newly created account does not have any licenses linked to it. The
Activation Key identifies the license you want to activate.
The administrator on the license can retrieve the key by going to the License Center at the
MathWorks website.
3-14
Activate MATLAB Installation Manually
Note When you create a new MathWorks Account, you must verify your email address before you
can proceed with activation. Before you click Next in the Email Verification Required dialog box, go
to your email program, open the message from MathWorks, and click the verification link. Then
return to this dialog box and click Next.
Select a license from the list of licenses linked with your MathWorks Account and click Next.
If you want to activate products on a license that is not linked to your MathWorks Account, select the
Enter an Activation Key for a license not listed option, enter an Activation Key, and click Next.
An Activation Key is the unique code that identifies a license. You can use the key to activate a license
or to link a license to your account. Ask the administrator of the license for the Activation Key.
If you selected an Individual License, you must specify the operating system user name of the person
who intends to use the software. The Individual License limits use of the software to a particular user
on a particular computer. MathWorks uses the operating system user name to identify this person.
The operating system user name is the ID through which a user gains access to a computer. This ID is
also known as the login name. To use MathWorks software, you must be logged in to the computer as
the user name that you specify.
By default, the activation application fills in the user name of the person running the activation
application. To accept this default, click Next. If you used your administrator account to install the
software but intend to use another account to access the software, you can specify that user name
here, and then click Next.
Note The installer skips this step for a Designated Computer license. See your license administrator
if you have any questions.
The installer then copies this license file onto your computer. This license file enables you to run
MathWorks products on your computer. MathWorks also keeps a record of the activation in
MathWorks systems.
After activating your installation, click Finish to exit the activation process.
Now that MATLAB and any accompanying products have been installed, you are ready to begin using
MathWorks software.
3-15
3 Administer Network Licenses
Because you were not logged in to your MathWorks Account during installation, or you started the
activation application independently, you must choose whether to activate automatically or manually.
Select the Activate manually without the Internet (recommended) option and click Next.
To activate without an Internet connection, you must have a license file. The license file identifies
which products you can run. The administrator on the license can retrieve the license file from the
License Center at the MathWorks website. Select the Enter the full path to your license file,
including the file name option and enter the full path to your license file in the text box (or drag
and drop the file) and click Next.
If you do not have your license file, select the I do not have a license file option and click Next to
get information about how to retrieve a license file.
If You Do Not Have a License File Save the information displayed in the dialog box. You can print a
copy of this information by clicking Print. Take the information to a computer with an Internet
connection and go to the License Center at the MathWorks website. MathWorks uses this information
to generate a File Installation Key and a license file. You must have this information with you when
you return to the computer on which you want to install and activate the software. To exit the
activation application, click Finish.
Your installation is not activated yet. You cannot run MATLAB until you retrieve your license file.
After activating your installation, click Finish to exit the activation process.
3-16
Install Network License Manager with Internet Connection
You only need to install the network license manager one time at a site. For information about
installing MathWorks software on client computers, see “Plan Your Network Installation” on page 3-2.
Whichever option you selected, remember to save the license file to the server where you will be
installing the network license manager.
Click Continue.
For this workflow, you can skip steps 2 and 3 in the License Center and continue following these
instructions.
When you select an installer on the website, you receive the files that the installer needs in order
to run on your selected platform, not the product files. The installer downloads the products that
it needs from MathWorks during installation.
2 Start the installer.
• Windows
If you click Run when you select the installer on the MathWorks website, the installer starts
automatically. If you saved the installer instead, double-click the self-extracting installer file in
the folder where you saved it. The name of the self-extracting installer file is
matlab_release_$ARCH, where release is the release you are installing (for example
R2021a) and $ARCH is the selected architecture.
3-17
3 Administer Network Licenses
To restart the installer later, click setup.exe. This file is located in the top level of the folder
where you extracted the files.
• macOS
Double-click the dmg file that you downloaded from the MathWorks website. Double-click
InstallForMacOSX.app.
• Linux
Use the unzip command to extract the files from the archive file that you downloaded from
the MathWorks website. After extracting the files, execute the installer command:
./install
3 When the installer prompts you to sign in, click Advanced Options > I want to install network
license manager.
If the installer can't find the hostid in the license, you'll get a message letting you know you must
manually add it after you finish installing.
• Accept the default installation folder, or click Browse to select a different one. If the folder does
not exist, the installer creates it.
• The destination folder must be on an absolute path.
• MathWorks recommends that you install the network license manager in its own folder. If you
select the top-level drive, you will be asked to confirm your selection.
• When specifying a folder name:
• You can use any alphanumeric character and some special characters, such as underscores.
• You cannot use non-English characters.
• Folder names cannot contain invalid characters and the destination cannot be named “private.”
If you make a mistake while entering a folder name and want to start over, click Restore Default.
3-18
Install Network License Manager with Internet Connection
When the installation is complete, note if the installer shows you any additional steps required to
complete configuration, and click Close. If there were additional required steps, complete them
before installing and running MATLAB on client computers.
See Also
Related Examples
• “Plan Your Network Installation” on page 3-2
• “Start the Network License Manager” on page 3-25
3-19
3 Administer Network Licenses
You must install the license manager and have it up and running before you install MATLAB software
on client computers.
You only need to install the network license manager one time at a site. For information about
installing MathWorks software on client computers, see “Plan Your Network Installation” on page 3-2.
Whichever option you selected, remember to save the license file to the server where you will be
installing the network license manager.
Click Continue.
For this workflow, you can skip steps 2 and 3 in the License Center and continue following these
instructions.
When you select an installer on the website, you receive the files that the installer needs in order
to run on your selected platform, not the product files. The installer downloads the products that
it needs from MathWorks during installation.
2 Copy the installer and the license file you downloaded to the server where you will be installing
the network license manager.
3-20
Install Network License Manager Offline
• Windows
If you click Run when you select the installer on the MathWorks website, the installer starts
automatically. If you saved the installer instead, double-click the self-extracting installer file in
the folder where you saved it. The name of the self-extracting installer file is
matlab_release_$ARCH, where release is the release you are installing (for example,
R2021a) and $ARCH is the selected architecture.
To restart the installer later, click setup.exe. This file is located in the top level of the folder
where you extracted the files.
• macOS
Double-click the dmg file that you downloaded from the MathWorks website. Double-click
InstallForMacOSX.app.
• Linux
Use the unzip command to extract the files from the archive file that you downloaded from
the MathWorks website. After extracting the files, execute the installer command:
./install
2 If you do not have an Internet connection, the installer will automatically begin the installation
with the File Installation Key workflow. Click Advanced Options > I want to install network
license manager.
If the installer can't find the hostid in the license, you'll get a message letting you know you must
manually add it after you finish installing.
• Accept the default installation folder, or click Browse to select a different one. If the folder does
not exist, the installer creates it.
• The destination folder must be on an absolute path.
• MathWorks recommends that you install the network license manager in its own folder. If you
select the top-level drive, you will be asked to confirm your selection.
• When specifying a folder name:
• You can use any alphanumeric character and some special characters, such as underscores.
• You cannot use non-English characters.
3-21
3 Administer Network Licenses
• Folder names cannot contain invalid characters and the destination cannot be named “private.”
If you make a mistake while entering a folder name and want to start over, click Restore Default.
When the installation is complete, note if the installer shows you any additional steps required to
complete configuration, and click Close. If there were additional required steps, complete them
before installing and running MATLAB on client computers.
See Also
Related Examples
• “Plan Your Network Installation” on page 3-2
• “Start the Network License Manager” on page 3-25
3-22
Update Network License Manager Software
To avoid any potential issues with license file operation, consider upgrading the network license
manager software whenever you upgrade MATLAB software.
• Linux and macOS Systems — Use the lmdown command. For additional information, see “Using
Command-Line Utilities” on page 3-28.
• Windows Systems — Remove the existing service to prevent any conflicts.
If you already have the network license manager installed and configured, you can download new
network license manager daemons directly to your server instead of using the MathWorks installer to
install the latest version of the software. The license manager daemons include:
3-23
3 Administer Network Licenses
• If you have an Internet connection, follow the procedure in “Install Network License Manager
with Internet Connection” on page 3-17.
• If you do not have an Internet connection, follow the procedure in “Install Network License
Manager Offline” on page 3-20.
See Also
Related Examples
• “Start the Network License Manager” on page 3-25
• “Network License Manager Tools” on page 3-27
3-24
Start the Network License Manager
There are several other ways to start the license manager, depending on your platform. This topic
describes these methods.
Note The user name associated with the network license manager process should be a user that is
defined locally on the computer, not defined on a network. The license manager starts up properly
only if the user name can be found during the startup process on the computer, before network users
are available.
Caution Follow these recommendations when using the network license manager:
Windows Systems
You can start the network license manager on Windows computers using any of the following
methods:
• Use the Windows Services control panel to start or stop the network license manager, if you chose
to configure it as a service during installation. On the Windows Start menu, select Settings >
Control Panel > Administrative Tools > Services.
• Use the license management utility, lmtools.exe, included in your MATLAB installation in the
matlabroot\etc\$ARCH folder, where $ARCH is a platform-specific subfolder. Start the
lmtools.exe application and select the Start/Stop/Reread tab.
To run lmstart on a macOS computer, open a terminal window using the Terminal application
(found in /Applications/Utilities) and navigate to the /etc folder in your MATLAB installation
folder:
cd /Applications/MATLAB_R2021a.app/etc
Caution A user other than root should run the lmstart script because it is a security risk to run any
program as root that does not require root permissions. The network license manager (lmgrd) does
not require root permissions.
3-25
3 Administer Network Licenses
If you must start the license manager as root, use the su command to start lmgrd as a nonprivileged
user, where username is a nonprivileged user.
Start the network license manager service with the -u username option, where username
represents a valid user name other than root.
Caution For security reasons, superuser cannot be an owner of the license manager daemons.
Make sure that the network license manager starts at the very end of the system boot sequence. For
the license manager to start correctly, the network must already be running. Use whatever
mechanism your version of Linux provides to configure the boot sequence.
See Also
Related Examples
• “Network License Manager Tools” on page 3-27
3-26
Network License Manager Tools
LMTOOLS is available for Windows computers only. All operating systems can use the command line
utilities.
To illustrate, the following example shows how to use LMTOOLS to see the current status of the
network license manager:
3-27
3 Administer Network Licenses
On Windows computers, FlexNet packages all the utilities in a single, command-line executable called
lmutil.exe. This program is available in the matlabroot\etc\$ARCH folder, where matlabroot
is your MATLAB installation folder and $ARCH is a platform-specific subfolder, such as win64. For
example, to run a status check of the network license manager, open a DOS command window and
run lmutil specifying lmstat as an argument:
lmutil lmstat -a -c "C:\Program Files\MATLAB\R2021a\etc\license.dat"
The -a option requests a verbose listing. You must also include the-c option to specify the license file
to use. You must use this option with every lmutil option. If your installation path contains spaces,
enclose the path in quotes. The following listing is a portion of the information returned.
lmutil - Copyright (c) 1989-2014 Flexera Software Inc. All Rights Reserved.
Flexible License Manager status on Tue 11/5/2014 10:11
MLM: UP v11.9
lmutil -h
To get help for a particular utility, type the name of the utility with the -h option, as in the following
example:
lmutil lmstat -h
On Linux and macOS computers, these license management utilities are individual executables,
available in the matlabroot/etc folder. For example, to view the status of the network license
manager, use the lmstat utility, as follows:
lmstat -a
lmutil - Copyright (c) 1989-2016 Flexera Software Inc. All Rights Reserved.
Flexible License Manager status on Fri 11/4/2016 10:11
3-28
Network License Manager Tools
MLM: UP v11.9
To get help for a particular utility, use the -h option, as in the following example:
lmstat -h
The following table lists the names of the most useful license management tools included.
Utility Description
lmdiag Diagnose license checkout problems.
lmdown Shut down all license daemons (both lmgrd and all vendor daemons) on the
license server node.
lmhostid Report the host ID of a system.
lmreread Make the network license manager reread the license file and start any new
vendor daemons.
Note When you use lmreread to reprocess a license file for a user-based
license, changes to INCLUDE statements in the associated network license
manager options file take effect after a 15-minute delay.
lmstat Display the status of all network licensing activities.
lmswitchr Switch to another report log file.
lmver Determine the version of a library or binary file.
Acknowledgments
This topic lists the copyright owners of content used in the network license manager vendor daemon.
MD5
MD5 derived from RSADSI MD5 Message-Digest Algorithm.Copyright (C) 1991-2, RSA Data Security,
Inc. Created 1991. All rights reserved.
License to copy and use this software is granted provided that it is identified as the "RSA Data
Security, Inc. MD5 Message-Digest algorithm" in all material mentioning or referencing this software
or this function.
License is also granted to make and use derivative works provided that such works are identified as
"derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning
or referencing the derived work.
RSA Data Security, Inc. makes no representations concerning either the merchantability of this
software or the suitability of this software for any particular purpose. It is provided "as is" without
express or implied warranty of any kind.
These notices must be retained in any copies of any part of this documentation and/or software.
3-29
3 Administer Network Licenses
See Also
Related Examples
• “Start the Network License Manager” on page 3-25
• “Update Network License” on page 3-8
3-30