Install MATLAB Runtime Noninteractively
R2026bTo 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.
| Platform | MATLAB 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.
| Option | Description |
|---|---|
--release= | Specify the MATLAB release (for example, To install a
release at a specific update level, append
To install the prerelease of an
upcoming version, append |
--destination= | Specify the installation folder. By default, If the path
already ends with a release folder name, Note Windows allows one MATLAB Runtime installation per release. To update an existing installation, uninstall and then reinstall the release. |
--no-gpu | Omit the Parallel Computing Toolbox™ GPU Runtime Add-on. |
--no-jre | Omit 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,
mpmadds MATLAB Runtime to the systemPATHenvironment 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,
mpmdisplays the folders you must add to theLD_LIBRARY_PATHorDYLD_LIBRARY_PATHenvironment 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:
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.
In your system command prompt, navigate to the folder where you extracted the installer.
Run the MATLAB Runtime installer, specifying the
-agreeToLicense yesoption on the command line. If you do not include-agreeToLicense yesas 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
binfolder.Platform Command Windows setup -agreeToLicense yesLinux sudo ./install -agreeToLicense yesNote
sudois 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 silentin the command to run the installer in silent mode.View a log of the installation.
On Windows systems, the installer creates a log file named
mathworks_, whereusername.logusernameis your Windows login name, in the location defined by yourTEMPenvironment variable.On Linux, the installer displays the log information at the command prompt. It also saves it to a file if you use the
-outputFileoption.
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.txtThen, specify the file using the -inputfile argument at the
command line. For example, on Linux:
./install -inputfile installer_input.txtYou can specify the following options in the installer input file.
| Option | Description |
|---|---|
agreeToLicense | Agree to the MATLAB Runtime license. |
destinationFolder | Specify where MATLAB Runtime is installed. If the user does not have write access to the folder, you must run the installer with administrator privileges. |
outputFile | Specify 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.