Main Content

Startup and Shutdown

Startup command line flags, startup and shutdown files


Best practice is to run MATLAB® only as a privileged user whenever elevated privileges are specifically required. A privileged user refers to the root user on Linux® and Mac, or an administrator on Windows®.


alle erweitern

matlab (Windows)Start MATLAB program from Windows system prompt
matlab (macOS)Start MATLAB program from macOS Terminal
matlab (Linux)Start MATLAB program from Linux system prompt
batchStartupOptionUsedDetermine if MATLAB started with -batch option
quitTerminate MATLAB program
exitTerminate MATLAB program (same as quit)
startupUser-defined startup script for MATLAB
finishUser-defined termination script for MATLAB
matlabrcSystem administrator-defined start up script for MATLAB


Start MATLAB on Windows Platforms

Different ways to start MATLAB on a Microsoft® Windows platform.

Start MATLAB on macOS Platforms

Start MATLAB from the Applications folder or a Terminal window.

Start MATLAB on Linux Platforms

Start MATLAB on Linux platforms by typing matlab at the operating system prompt.

Specify Startup Options

Specify startup options (also called command flags or command-line switches) that instruct the MATLAB program to perform certain operations when you start it.

MATLAB Startup Folder

Set the initial working folder using the General Preferences options in the Preferences Window.


Ways to exit MATLAB.


Recovering Data After Abnormal Termination

Techniques for recovering information if MATLAB terminates unexpectedly.

Crash Reporting

Sending crash reports to MathWorks®.

When MATLAB Terminates Unexpectedly

Using MathWorks Crash Reporter and Crash Analyzer to report an internal error.

Specifying Java Startup Options

You can specify custom Java® startup options by creating a java.opts file.

Associate .mat Files with MATLAB

To associate a .mat extension type with MATLAB R2010b or later, use the Microsoft Windows Default Programs control panel.

Startup with Java Access Bridge Software

Starting MATLAB with programs using Java Access Bridge software.

Remove canberra-gtk-module and pk-gtk-module Messages

How to remove canberra-gtk-module and pk-gtk-module messages at startup.