Main Content

Install and Configure MATLAB Runtime

Supported Platforms: Windows®, Linux®, macOS

MATLAB® Runtime contains the libraries needed to run MATLAB applications on a target system without a licensed copy of MATLAB.

Download MATLAB Runtime Installer

Download MATLAB Runtime using one of the following options:

  • Download the MATLAB Runtime installer at the latest update level for the selected release from the website at This option is best for end users who want to run deployed applications.

  • Use the MATLAB function to download the MATLAB Runtime installer matching the version and update level of MATLAB from where the command is executed. If the installer has already been downloaded to the machine, it returns the path to the MATLAB Runtime installer. If the machine is offline, it returns a URL to the MATLAB Runtime installer. This option is best for developers who want to create application installers that contain MATLAB Runtime.

Install MATLAB Runtime Interactively

To install MATLAB Runtime:

  1. Extract the archive containing the MATLAB Runtime installer.


    Unzip the MATLAB Runtime installer.

    Right-click the ZIP file and select Extract All.


    Unzip the MATLAB Runtime installer at the terminal using the unzip command.

    For example, if you are unzipping the R2022a MATLAB Runtime installer, at the terminal, type:



    Unzip the MATLAB Runtime installer at the terminal using the unzip command.

    For example, if you are unzipping the R2022a MATLAB Runtime installer, at the terminal, type:



    The release part of the installer file name (_R2022a_) changes from one release to the next.

  2. Start the MATLAB Runtime installer.


    Double-click the file setup.exe from the extracted files to start the installer.


    At the terminal, type:

    sudo -H ./install


    You may need to allow the root user to access the running X server:

    xhost +SI:localuser:root
    sudo -H ./install
    xhost -SI:localuser:root


    At the terminal, type:



    You may need to enter an administrator user name and password after you run ./install.


    If you are running the MATLAB Runtime installer on a shared folder, be aware that other users of the share may need to alter their system configuration.

  3. When the MATLAB Runtime installer starts, it displays a dialog box. Read the information and then click Next to proceed with the installation.

  4. In the Folder Selection dialog box, specify the folder in which you want to install MATLAB Runtime.


    You can have multiple versions of MATLAB Runtime on your computer, but only one installation for any particular version. If you already have an existing installation, the MATLAB Runtime installer does not display the Folder Selection dialog box because it overwrites the existing installation in the same folder.

  5. Confirm your choices and click Next.

    The MATLAB Runtime installer starts copying files into the installation folder.

  6. On Linux and macOS platforms, after copying files to your disk, the MATLAB Runtime installer displays the Product Configuration Notes dialog box. This dialog box contains information necessary for setting your path environment variables. Copy the path information from this dialog box, save it to a text file, and then click Next. For information on setting environment variables, see Set MATLAB Runtime Path for Deployment.

  7. Click Finish to exit the installer.

The default MATLAB Runtime installation directory for R2022a is specified in the following table:

Operating SystemMATLAB Runtime Installation Directory
WindowsC:\Program Files\MATLAB\MATLAB Runtime\v912

Install MATLAB Runtime Noninteractively

To install MATLAB Runtime without having to interact with the installer dialog boxes, use one of these noninteractive modes:

  • Silent — The installer runs as a background task and does not display any dialog boxes.

  • Automated — The installer displays the dialog boxes but does not wait for user interaction.

When run in silent or automated mode, the MATLAB Runtime installer uses default values for installation options. You can override these values by using MATLAB Runtime installer command-line options or an installer control file.


When running in silent or automated mode, the installer overwrites the installation location.

Run Installer in Silent Mode

To install MATLAB Runtime in silent mode:

  1. Extract the contents of the MATLAB Runtime installer archive to a temporary folder.

  2. In your system command prompt, navigate to the folder where you extracted the installer.

  3. Run the MATLAB Runtime installer, specifying the -mode silent and -agreeToLicense yes options on the command line.


    On most platforms, the installer is located at the root of the folder into which the archive was extracted. On 64-bit Windows, the installer is located in the archive bin folder.

    Windowssetup -mode silent -agreeToLicense yes
    Linux./install -mode silent -agreeToLicense yes
    macOS./install -mode silent -agreeToLicense yes


    If you do not include the -agreeToLicense yes option, the installer does not install MATLAB Runtime.

  4. View a log of the installation.

    On Windows systems, the MATLAB Runtime installer creates a log file named mathworks_username.log, where username is your Windows login name, in the location defined by your TEMP environment variable.

  5. On Linux and macOS systems, the MATLAB Runtime installer displays the log information at the command prompt and also saves it to a file if you use the -outputFile option.

Customize a Noninteractive Installation

When run in one of the noninteractive modes, the installer uses the default values unless you specify otherwise. Like the MATLAB installer, the MATLAB Runtime installer accepts a number of command-line options that modify the default installation properties.

-destinationFolderSpecifies where MATLAB Runtime is installed.
-outputFileSpecifies where the installation log file is written.

Specifies where temporary files are stored during installation.


The installer deletes everything inside the specified folder.

-automatedModeTimeoutSpecifies how long, in milliseconds, that each dialog box is displayed when run in automatic mode.
-inputFileSpecifies an installer control file that contains your command-line options and values. Omit the dashes and put each option and value pair on a separate line.


The MATLAB installer archive includes an example installer control file called installer_input.txt. This file contains all of the options available for a full MATLAB installation. The options listed in this section are valid for the MATLAB Runtime installer.

Install MATLAB Runtime without Administrator Rights

To install MATLAB Runtime as a user without administrator rights on Windows:

  1. Use the MATLAB Runtime installer to install it on a Windows machine where you have administrator rights.

  2. Copy the folder where MATLAB Runtime was installed to the machine without administrator rights. You can compress the folder into a zip file for distribution.

  3. On the machine without administrator rights, add the <MATLAB_RUNTIME_INSTALL_DIR>\runtime\arch directory to the user’s PATH environment variable. For more information, see Set MATLAB Runtime Path for Deployment.

Install Multiple MATLAB Runtime Versions on Single Machine

MCRInstaller supports the installation of multiple versions of MATLAB Runtime on a target machine. This capability allows applications compiled with different versions of MATLAB Runtime to execute side by side on the same machine.

If you do not want multiple MATLAB Runtime versions on the target machine, you can remove the unwanted ones. On Windows, run Add or Remove Programs from the Control Panel to remove a specific version. On Linux, manually delete the unwanted MATLAB Runtime directories. You can remove unwanted versions before or after installation of a more recent version of MATLAB Runtime because versions can be installed or removed in any order.


Installing multiple versions of MATLAB Runtime on the same machine is not supported on macOS.

Install MATLAB and MATLAB Runtime on Same Machine

To test your deployed component on your development machine, you do not need an installation of MATLAB Runtime. The MATLAB installation that you use to compile the component can act as a MATLAB Runtime replacement.

You can, however, install MATLAB Runtime for debugging purposes.

Modify Path

If you install MATLAB Runtime on a machine that already has MATLAB on it, you must adjust the system library path according to your needs.

To run deployed MATLAB code against MATLAB Runtime rather than MATLAB, ensure that your library path lists the MATLAB Runtime directories before any MATLAB directories.

For information on setting environment variables, see Set MATLAB Runtime Path for Deployment.

Uninstall MATLAB Runtime

The method you use to uninstall MATLAB Runtime from your computer varies depending on your platform.


  1. Start the uninstaller.

    From the Windows Start menu, search for the Add or Remove Programs control panel, and double-click MATLAB Runtime in the list.

    You can also start the MATLAB Runtime uninstaller from the <MATLAB_RUNTIME_INSTALL_DIR>\uninstall\bin\<arch> folder, where <MATLAB_RUNTIME_INSTALL_DIR> is your MATLAB Runtime installation folder and <arch> is an architecture-specific folder, such as win32 or win64.

  2. Select MATLAB Runtime from the list of products in the Uninstall Products dialog box and click Next.

  3. Click Finish.


  1. Close all instances of MATLAB and MATLAB Runtime.

  2. Enter this command at the Linux terminal:



    Be careful when using the rm command, as deleted files cannot be recovered.


  1. Close all instances of MATLAB and MATLAB Runtime.

  2. Navigate to your MATLAB Runtime installation folder. For example, the installation folder might be named in your Applications folder.

  3. Drag your MATLAB Runtime installation folder to the trash, and then select Empty Trash from the Finder menu.

See Also

Related Topics