Main Content

Install MATLAB Runtime Noninteractively

R2026b

To install MATLAB® Runtime noninteractively, run the installer at the command line and specify installation arguments as command-line arguments or in an installer control file. Noninteractive installations allow you to automate the installation of MATLAB Runtime in scripts, Dockerfiles, and CI/CD pipelines.

You can also install MATLAB Runtime using MATLAB Package Manager (MPM), the same tool used to install MATLAB and related products. (since R2026b)

For other ways of installing MATLAB Runtime, see Download and Install MATLAB Runtime.

Default Install Folder

The following table lists the default MATLAB Runtime installation folders for R2026b.

PlatformMATLAB Runtime Installation Folder
Windows®C:\Program Files\MATLAB\MATLAB Runtime\R2026b
Linux®/usr/local/MATLAB/MATLAB_Runtime/R2026b
macOS/Applications/MATLAB/MATLAB_Runtime/R2026b

For releases prior to R2022b, the installation folder name is the MATLAB Runtime version number without the period, such as v97 (R2019b) or v913 (R2022b). For example, MATLAB Runtime R2021b installs to C:\Program Files\MATLAB\MATLAB Runtime\v911 on Windows.

Install MATLAB Runtime Using MPM

Since R2026b

You can install MATLAB Runtime R2020a or later using MATLAB Package Manager (MPM). For more information on MPM, see Get MATLAB Package Manager.

On Windows, run mpm install from an elevated command prompt. If the prompt isn't elevated, mpm stops with an error before downloading or installing any files.

On Linux and macOS, you must have write access to the installation folder. If the user account does not have write access, run the mpm command using sudo.

To install MATLAB Runtime, run mpm install and specify the product as MATLAB_Runtime as well as the release to install. MATLAB_Runtime must be the only product in the --products list. Install other MATLAB products in a separate mpm install command.

For example, install MATLAB Runtime R2026b at the latest update level in the default location.

mpm install --products=MATLAB_Runtime --release=R2026b

mpm displays the MATLAB Runtime license notice during installation.

You can specify the following options in the mpm install command when installing MATLAB Runtime.

OptionDescription
--release=<release>

Specify the MATLAB release (for example, R2025a). The release must be R2020a or later. This option is required.

To install a release at a specific update level, append U<update_number> to the release. For example, R20XXyU0 installs the initial release, R20XXyU1 installs update 1, and so on.

To install the prerelease of an upcoming version, append Prerelease to the release. You can also specify a prerelease update number. For example, R2024bPrereleaseU4.

--destination=<path>

Specify the installation folder. By default, mpm installs MATLAB Runtime in a subfolder named for the release. For example, --destination=/opt/MATLAB_Runtime installs MATLAB Runtime in /opt/MATLAB_Runtime/R2025a.

If the path already ends with a release folder name, mpm installs MATLAB Runtime in that folder.

Note

Windows allows one MATLAB Runtime installation per release. To update an existing installation, uninstall and then reinstall the release.

--no-gpuOmit the Parallel Computing Toolbox™ GPU Runtime Add-on.
--no-jreOmit the Java® Runtime Environment (JRE™). Applies to MATLAB Runtime R2026a and earlier. Starting in R2026b, MATLAB Runtime does not include the JRE. For more details, see Use Java Runtime Environment (JRE) with MATLAB Runtime.

For example, install MATLAB Runtime R2025a update 1 to the custom location /opt/MATLAB_Runtime.

mpm install --products=MATLAB_Runtime --release=R2025aU1 --destination=/opt/MATLAB_Runtime

Reduce MATLAB Runtime Size

You can omit optional dependencies, such as GPU libraries and the Java Runtime Environment, from a MATLAB Runtime installation. For more details, see Reduce MATLAB Runtime Size.

To install MATLAB Runtime without GPU libraries, use the --no-gpu flag in the mpm command. For example:

mpm install --products=MATLAB_Runtime --release=R2025a --no-gpu

To install MATLAB Runtime without the JRE, use the --no-jre flag in the mpm command. For example:

mpm install --products=MATLAB_Runtime --release=R2025a --no-jre

Use both flags to omit both the JRE and GPU libraries from the installation.

mpm install --products=MATLAB_Runtime --release=R2025a --no-gpu --no-jre

Post-Install Behavior

After a successful installation, MATLAB Runtime must be added to the system library path.

  • On Windows, mpm adds MATLAB Runtime to the system PATH environment variable, records the installation in the registry, adds an entry to Apps > Installed apps (Add/Remove Programs), and registers the MATLAB Runtime COM and .NET components.

  • On Linux and macOS, mpm displays the folders you must add to the LD_LIBRARY_PATH or DYLD_LIBRARY_PATH environment variable, respectively. For more details, see Set MATLAB Runtime Library Paths for Deployment.

Install MATLAB Runtime Using Full Installer and Installation Arguments

Supported platforms: Windows, Linux

If you have many installations to perform, you can use the full MATLAB Runtime installer and specify installation arguments as command-line arguments or in an installer control file on Windows and Linux systems. When you specify installation arguments, the MATLAB Runtime installer runs as a background task and does not display any dialog boxes. Installation arguments are not supported on macOS.

When running noninteractively, the installer overwrites the installation location.

Caution

On Linux, the installer displays information necessary for setting your environment variables in the Product Configuration Notes dialog box. If you use the installer noninteractively, you must locate your MATLAB Runtime installation directory in order to set the library path after installation. For more information, see Set MATLAB Runtime Library Paths for Deployment.

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. For information on downloading the installer, see Download and Install MATLAB Runtime.

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

  3. Run the MATLAB Runtime installer, specifying the -agreeToLicense yes option on the command line. If you do not include -agreeToLicense yes as the first option, the installer will not install MATLAB Runtime.

    Note

    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.

    PlatformCommand
    Windowssetup -agreeToLicense yes
    Linux

    sudo ./install -agreeToLicense yes

    Note

    sudo is only required if you install to a directory you do not have write access to.

    Note

    To install MATLAB Runtime R2022a and earlier, you must also specify -mode silent in the command to run the installer in silent mode.

  4. View a log of the installation.

    • On Windows systems, the 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.

    • On Linux, the installer displays the log information at the command prompt. It also saves it to a file if you use the -outputFile option.

Customize Noninteractive Installation

When run noninteractively, the installer uses the default values unless you specify otherwise. Like the MATLAB installer, the MATLAB Runtime installer accepts a number of options that modify the default installation properties.

Create an installer control text file that contains your command-line options and values. Put each option and value pair on a separate line. For example, on Linux:

agreeToLicense=yes
destinationFolder=/usr/MATLAB/MATLAB_Runtime
outputFile=myapp_log.txt

Then, specify the file using the -inputfile argument at the command line. For example, on Linux:

./install -inputfile installer_input.txt

You can specify the following options in the installer input file.

OptionDescription
agreeToLicenseAgree to the MATLAB Runtime license.
destinationFolderSpecify where MATLAB Runtime is installed. If the user does not have write access to the folder, you must run the installer with administrator privileges.
outputFileSpecify where the installation log file is written.

Note

The MATLAB installer archive includes an example installer control file called installer_input.txt, which contains all of the options available for a full MATLAB installation. However, the MATLAB Runtime installer only accepts the options listed in this section.

Uninstall MATLAB Runtime

For information on uninstalling MATLAB Runtime, see Uninstall MATLAB Runtime.

See Also

Topics